ExchangeWorld~$ npm install)gulp (may require installing Gulp globally npm install gulp -g)gulp prod task (Note: the production task does not fire up the express server, and won't provide you with browser-sync's live reloading. Simply use gulp dev during development. More information below)gulp deploy to transfer compressed build dir to remote server.gulp dev is running, the server is up as well and serving files from the /build directory. Any changes in the /app directory will be automatically processed by Gulp and the changes will be injected to any open browsers pointed at the proxy address.ExchangeWorld~$ npm install
ExchangeWorld~$ gulp
localhost:3000 in browser for you. ヽ(✿゚▽゚)ノAngularJS is a MVW (Model-View-Whatever) Javascript Framework for creating single-page web applications. In this boilerplate, it is used for all the application routing as well as all of the frontend views and logic.
The AngularJS files are all located within app/angular, structured in the following manner:
Create folders named for the feature they represent. When a folder grows to contain more than 7 files, start to consider creating a folder for them. Your threshold may be different, so adjust as needed.
.
├── core
├── exchange
├── follow
│ ├── follow.controller.js // put all related controller/service/html in same feature folder
│ ├── follow.html
│ ├── follow.module.js
│ ├── follow.route.js
│ └── follow.service.js
├── goods
├── home
├── layout
├── main.js
├── map
├── mobile
├── post
├── profile
├── seek
├── templates.js
├── tmp
└── utils
All angularjs related code should follow the coding style guide
Run ESLint.
$ npm run lint
# Auto fix
$ npm run lint -- --fixRun JSCS.
$ npm run jscs
# Auto fix
$ npm run jscs -- --fixDependency injection is carried out with the ng-annotate library. In order to take advantage of this, a simple comment of the format:
/** @ngInject */needs to be added directly before any Angular functions/modules. The Gulp tasks will then take care of adding any dependency injection, requiring you only to specify the dependencies within the function call and nothing more.