GithubHelp home page GithubHelp logo

bebraw / libtemplate.js Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 376 KB

Template for JS libraries designed to work with GitHub Pages and Jekyll (MIT)

Home Page: http://bebraw.github.com/libtemplate.js/

License: MIT License

JavaScript 97.20% CSS 0.78% Shell 2.02%

libtemplate.js's Introduction

libtemplate - Template for JS libraries designed to work with GitHub Pages and Jekyll

libtemplate makes it easier to start writing JavaScript libraries. It has been designed to be used with GitHub (and GitHub pages). In addition it uses Grunt as a build system.

Getting Started

  1. git clone [email protected]:bebraw/libtemplate.js.git mylib
  2. cd mylib
  3. rm -rf .git
  4. git init
  5. git add .
  6. git commit

As you can see this workflow loses the version history and gives you a blank slate to get started with.

After you have done that npm install the dependencies. In addition you will need to set up Jekyll and Pygments in case you wish to use syntax highlighting.

Now that everything should be set up, invoke grunt. You should have a nice, interactive development server running. Surf to localhost:4000 at your browser. If you have set up LiveReload extension the changes you make to the project _meta data or package.json should cause the browser window to refresh automatically. This allows you to prototype your project README.md and site in a quick manner.

Other Features

Besides the basic grunt functionality, there are various helpers around. I've listed these in the following list:

  • grunt build updates project files based on metadata. Handy if you just want to make some quick change.
  • scripts/pu.sh pushes the current changes to GitHub. In addition it pushes the contents of the master branch to gh-pages so the index shows up properly at GitHub Pages. It also pushes your tags to GitHub.

Code Example

This bit is here just to illustrate how Pygments works. The example will render with syntax highlighting on both README.md and GitHub Pages index.

var a = 4;

function add(a, b) {
    return a + b;
}

License

libtemplate is available under MIT. See LICENSE for more details.

libtemplate.js's People

Contributors

bebraw avatar

Stargazers

Moved to @ad-si avatar

Watchers

 avatar James Cloos avatar  avatar

libtemplate.js's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.