ashrewdmint / js-skeleton-project

Empty JS project that uses browserify and stylus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JS Skeleton Project

About

This is a basic one-page JavaScript project which uses bower and npm for package management, stylus for CSS, browserify for JavaScript modules/dependencies, jasmin for tests, jshint for code quality enforcement, and jake for building and tasks (instead of gulp or grunt).

Getting started

  1. Install node at https://nodejs.org/download/. Also consider using nvm to manage different versions of node
  2. $ npm install
  3. $ npm install -g jake to install Jake globally
  4. $ npm install -g bower to install Bower globally
  5. $ bower install to install Bower components
  6. $ jake to build the project
  7. $ jake server to start a server. Browsers connected to the server will automatically refresh if anything in build/ changes
  8. Run Jake with env=production to build and minify source files and send them to the public/ directory (e.g. $ jake env=production), or to serve the public/ directory without livereload or source watching (e.g. $ jake server env=production)
  9. $ jake test runs the tests

Adding packages

  • $ npm install some-package --save, for npm packages
  • $ bower install some-package --save, for bower components

Best practices

  • Prefer npm modules over 'bower' components; if you can install an external JavaScript library with either npm or bower, use npm.

TODO

  • Use file tasks for compiling JS and CSS
  • Make this into a yeoman recipe, or whatever those are called?

About

Empty JS project that uses browserify and stylus

License:ISC License


Languages

Language:JavaScript 91.6%Language:HTML 4.4%Language:CSS 4.0%