- Install Node.js
- on OSX use homebrew
brew install node - on Windows use chocolatey
choco install nodejs
-
Install these NPM packages globally
npm install -g bower gulp nodemon
Refer to these instructions on how to not require sudo
-
Install and start elasticsearch
- follow instructions here elasticsearch
-
Import test data into elasticsearch DB -From project root
cd data node load_PRs.js -
Add the following to elasticsearch config to enable CORS
http.cors.enabled : true http.cors.allow-origin : "*" http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE http.cors.allow-headers : X-Requested-With,X-Auth-Token,Content-Type, Content-Length script.engine.groovy.inline.aggs: on script.groovy.sandbox.enabled: true script.update: on
- Run code analysis using
gulp vet. This runs jshint, jscs, and plato.
- Run the unit tests using
gulp test(via karma, mocha, sinon).
-
Run the project with
gulp serve-dev -
opens it in a browser and updates the browser with any files changes.
- Build the optimized project using
gulp build - This create the optimized code for the project and puts it in the build folder
- Run the optimize project from the build folder with
gulp serve-build
-
gulp helpDisplays all of the available gulp tasks.
-
gulp vetPerforms static code analysis on all javascript files. Runs jshint and jscs.
-
gulp vet --verboseDisplays all files affected and extended information about the code analysis.
-
gulp platoPerforms code analysis using plato on all javascript files. Plato generates a report in the reports folder.
-
gulp serve-specsServes and browses to the spec runner html page and runs the unit tests in it. Injects any changes on the fly and re runs the tests. Quick and easy view of tests as an alternative to terminal via
gulp test. -
gulp testRuns all unit tests using karma runner, mocha, chai and sinon with phantomjs. Depends on vet task, for code analysis.
-
gulp test --startServersRuns all unit tests and midway tests. Cranks up a second node process to run a server for the midway tests to hit a web api.
-
gulp autotestRuns a watch to run all unit tests.
-
gulp autotest --startServersRuns a watch to run all unit tests and midway tests. Cranks up a second node process to run a server for the midway tests to hit a web api.
-
gulp cleanRemove all files from the build and temp folders
-
gulp clean-imagesRemove all images from the build folder
-
gulp clean-codeRemove all javascript and html from the build folder
-
gulp clean-fontsRemove all fonts from the build folder
-
gulp clean-stylesRemove all styles from the build folder
-
gulp fontsCopy all fonts from source to the build folder
-
gulp imagesCopy all images from source to the build folder
-
gulp stylesCompile less files to CSS, add vendor prefixes, and copy to the build folder
-
gulp wiredepLooks up all bower components' main files and JavaScript source code, then adds them to the
index.html.The
.bowerrcfile also runs this as a postinstall task wheneverbower installis run.
-
gulp templatecacheCreate an Angular module that adds all HTML templates to Angular's $templateCache. This pre-fetches all HTML templates saving XHR calls for the HTML.
-
gulp templatecache --verboseDisplays all files affected by the task.
-
gulp serve-devServes the development code and launches it in a browser. The goal of building for development is to do it as fast as possible, to keep development moving efficiently. This task serves all code from the source folders and compiles less to css in a temp folder.
-
gulp serve-dev --nosyncServes the development code without launching the browser.
-
gulp serve-dev --debugLaunch debugger with node-inspector.
-
gulp serve-dev --debug-brkLaunch debugger and break on 1st line with node-inspector.
-
gulp optimizeOptimize all javascript and styles, move to a build folder, and inject them into the new index.html
-
gulp buildCopies all fonts, copies images and runs
gulp optimizeto build the production code to the build folder.
-
gulp serve-buildServe the optimized code from the build folder and launch it in a browser.
-
gulp serve-build --nosyncServe the optimized code from the build folder and manually launch the browser.
-
gulp serve-build --debugLaunch debugger with node-inspector.
-
gulp serve-build --debug-brkLaunch debugger and break on 1st line with node-inspector.
-
gulp bumpBump the minor version using semver. --type=patch // default --type=minor --type=major --type=pre --ver=1.2.3 // specific version
MIT