Clone a copy of the main RKPR repo
git clone https://github.com/jried31/RKPR.git
https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
Grunt is a Javscript Task Runner that lets you automate minification, compilation, unit testing, linting (checking your code usage) , etc.
npm install -g grunt-cli
The job of the Grunt CLI is simple: run the version of Grunt which has been installed next to a Gruntfile
Enter Node.js directory
cd Cloud
Option 1: Install dependencies for production
npm install --production
Option 2: Install dependencies for development
npm install
jsdoc is used to document the JavaScript. jsdoc is already included already installed as a dependency
To generate documentation run (Make sure you are in the Cloud
directory)
npm run doc
The documentation is saved into Cloud/jsdoc
Read the documentation
It is saved under the gh-pages
branch.
mocha is a framework for running tests on Node.js
expect.js is a Behavior Driven Development(BDD) testing library.
Both mocha and expect.js are installed as development dependencies after running npm install
.
To run tests (Make sure you are in the Cloud
directory)
npm run test
The dependencies for the Node.js application is managed via package.json
in the Cloud/
directory.
Please refer to devDependencies and dependencies for samples of dependencies that are saved.
There is no need to version control node packages because simply runningnpm install
will install packages specified in package.json
If you are installing a new dependency and need to save it as a production depenendency run:
npm i <package> --save
For more information please refer to here;
If you are installing a new dependency and need to save it as a development depenendency run:
npm i <package> --save-dev
Make sure you have grunt-cli
installed before continuing. See above for installation instructions.
As mentioned, Grunt is a Javscript Task Runner that lets you automate minification, compilation, unit testing, linting (checking your code usage) , etc.
The configuration for these tasks are specified in Gruntfile.js
Some tasks that have been configured
grunt // executes the default tasks that have been configured (currently executes jsonlint and jshint)
grunt jsonlint // detect errors in JSON files
grunt jshint // detect errors and potential and problems in your JavaScript code