How to run the project
- Install node modules (
ExchangeWorld~$ npm install)
- run ExchangeWorld
gulp(may require installing Gulp globally
npm install gulp -g)
- Your browser will automatically be opened and directed to the browser-sync proxy address
- To prepare assets for production, run the
gulp prodtask (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 devduring development. More information below)
- If you are ready to put build files to server, run
gulp deployto transfer compressed build dir to remote server.
- Now that
gulp devis running, the server is up as well and serving files from the
/builddirectory. Any changes in the
/appdirectory will be automatically processed by Gulp and the changes will be injected to any open browsers pointed at the proxy address.
- in terminal:
ExchangeWorld~$ npm install ExchangeWorld~$ gulp
- gulp will open
localhost:3000in browser for you. ヽ(✿ﾟ▽ﾟ)ノ
- start coding...
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
$ npm run lint # Auto fix $ npm run lint -- --fix
$ npm run jscs # Auto fix $ npm run jscs -- --fix
Dependency 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.