Exchange your preloved with people locally and personally
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
app fix Mar 30, 2016
config support es7 Jan 29, 2016
gulp init Feb 24, 2016
script this one is correct yo Mar 17, 2016
ssl update(express/backend): adjust it to be a static file server Sep 13, 2015
test map component Jul 27, 2015
.eslintrc support es7 Jan 29, 2016
.gitignore refine error catcher Feb 24, 2016
.jshintrc jshint Nov 10, 2015
.travis.yml [refactor] favorite Feb 5, 2016
LICENSE Angularjs-gulp-browserify Boilerplate Jul 15, 2015 Update Jan 26, 2016
gulpfile.js code review Aug 24, 2015
jsconfig.json for vscode Nov 10, 2015
package.json upload avatar styles Mar 14, 2016

ExchangeWorld Web

Build Status

How to run the project

  1. Install node modules (ExchangeWorld~$ npm install)
  2. run ExchangeWorld
  3. Run gulp (may require installing Gulp globally npm install gulp -g)
  4. Your browser will automatically be opened and directed to the browser-sync proxy address
  5. To prepare assets for production, run the 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)
  6. If you are ready to put build files to server, run gulp deploy to transfer compressed build dir to remote server.
  7. Now that 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.

Simple Version

  1. in terminal:
ExchangeWorld~$ npm install
ExchangeWorld~$ gulp
  1. gulp will open localhost:3000 in browser for you. ヽ(✿゚▽゚)ノ
  2. start coding...


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

Coding Style

  • All angularjs related code should follow the coding style guide

  • Run ESLint.

    $ npm run lint
    # Auto fix
    $ npm run lint -- --fix
  • Run JSCS.

    $ npm run jscs
    # Auto fix
    $ npm run jscs -- --fix

Dependency injection

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.