Generated from HotTowel Angular
Opinionated AngularJS style guide for teams by @john_papa
npm install -g yo
Install these NPM packages globally
npm install -g bower gulp nodemon`
Refer to these instructions on how to not require sudo
- Run code analysis using
gulp vet. This runs jshint, jscs, and plato.
- Run the unit tests using
gulp test(via karma, mocha, sinon).
Running in dev mode
Run the project with
gulp serve-dev --sync
--syncopens it in a browser and updates the browser with any files changes.
Building the project
- Build the optimized project using
- This create the optimized code for the project and puts it in the build folder
Running the optimized code
- Run the optimize project from the build folder with
HotTowel Angular starter project
The structure also contains a gulpfile.js and a server folder. The server is there just so we can serve the app using node. Feel free to use any server you wish.
/src /client /app /content
When you generate the project it should run these commands, but if you notice missing pavkages, run these again:
The app has 4 feature modules and depends on a series of external modules and custom but cross-app modules
app --> [ app.admin, app.dashboard, app.layout, app.widgets, app.core --> [ ngAnimate, ngSanitize, ui.router, blocks.exception, blocks.logger, blocks.router ] ]
Core modules are ones that are shared throughout the entire application and may be customized for the specific application. Example might be common data services.
This is an aggregator of modules that the application will need. The
core module takes the blocks, common, and Angular sub-modules as dependencies.
Block modules are reusable blocks of code that can be used across projects simply by including them as dependencies.
blocks.logger module handles logging across the Angular app.
blocks.exception module handles exceptions across the Angular app.
It depends on the
blocks.logger module, because the implementation logs the exceptions.
blocks.router module contains a routing helper module that assists in adding routes to the $routeProvider.