Everyone should use his own repository to develop a new feature, and then make a pull request
(PR) for requesting merging the code into master branch. So, first of all, you should click the Fork
button which is at the top-left of the Github to make a new copy of the repository to your own.
Screenshot
Use Git clone
to clone a mirror copy of code to your dist (Run the command on your terminal):
git clone https://github.com/[YOUR USERNAME]/lbs_ad_server.git
cd lbs_ad_server
npm install
- or - (if using yarn)
yarn
cd lbs_ad_server
npm run dev-server Note that, if there is error about missingdist/manifest.json
, you should runnpm run dev
for the first time.
Then, you can visit http://127.0.0.1:3000/api/locations to fetch locations data.
Sometimes we use local configurations to make some personal customizing. For example, to use fake api for local development. In this case, you should add your own local_config.js
file in root directory. The content of local_config follow the same structure of config.js, but it will overwrite the same key-value
in config file. A example of using mock data may like this:
module.exports = {
useFakeApi: true,
};
npm run dev
More useful scripts can be achieved at package.json.
Switch on Travis CI for you local branch: https://travis-ci.org/profile
Following this tutorial: https://help.github.com/articles/configuring-a-remote-for-a-fork/
git checkout master
git fetch --all
git rebase upstream/master
git push
Note that, each time when you develop a future, you should use a separated branch.
git checkout -b [the new branche nanme]
May be used in future: