A project based on Josh Miller's Angular boilerplate ([ngbp]).
- Clone the repository
- Install Node/npm, Bower and less, if not present
- Install Grunt for build routines and Karma for testing with: sudo npm -g install grunt-cli karma bower
- Install Grunt dependencies: npm install
- Install JS dependencies* (/vendor): bower install
*All dependencies are listed in the bower.json file, so everytime a new one is needed, the referred file must be updated
In the project site, the structure's description is pretty straightforward:
project/ |- grunt-tasks/ |- karma/ |- src/ | |- app/ | | |- | |- assets/ | | |- | |- common/ | | |- | |- less/ | | |- main.less |- vendor/ | |- angular-bootstrap/ | |- bootstrap/ | |- placeholders/ |- .bowerrc |- bower.json |- build.config.js |- Gruntfile.js |- module.prefix |- module.suffix |- package.json
karma/
- test configuration.src/
- our application sources.vendor/
- third-party libraries. Bower will install packages here. Anything added to this directory will need to be manually added tobuild.config.js
andkarma/karma-unit.js
to be picked up by the build system..bowerrc
- the Bower configuration file. This tells Bower to install components into thevendor/
directory.bower.json
- this is our project configuration for Bower and it contains the list of Bower dependencies we need.build.config.js
- our customizable build settings; see "The Build System" below.Gruntfile.js
- our build script; see "The Build System" below.module.prefix
andmodule.suffix
- our compiled application script is wrapped in these, which by default are used to place the application inside a self-executing anonymous function to ensure no clashes with other libraries.package.json
- metadata about the app, used by NPM and our build script. Our NPM dependencies are listed here.