This guide assumes, that you are familiar with the use of git, npm and grunt.
- git fork grunt-jsonfile plugin for grunt (https://github.com/db-developer/grunt-jsonfile.git)
- cd into forked grunt-jsonfile directory
- open a shell
- make sure your environment knows about the paths to nodejs
- run
npm install
The code of grunt-jsonfile can be tested. A mocha/istanbul testsuite is provided. See directory test
.
Open a shell to run the tests, make sure the environment is set, cd into the forked grunt-jsonfile directory and run: grunt test
With testing (see above) code coverage is available and can be configured by gruntfile.js.
Open a shell to run code coverage, make sure the environment is set, cd into the forked grunt-jsonfile directory and run: grunt coverage
.
The results of a code coverage run are located in the directory dist/coverage
.
Open a shell to run generation of api docs. Make sure the environment is set, cd into the forked grunt-jsonfile directory and run: grunt docs
.
The result of api doc generation is located in the directory ´docs/api
.
You have the choice of either simply creating grunt-json-<version>.tgz by running grunt build
or to run all tests, code coverage and creating grunt-json-<version>.tgz by grunt all
.
All resulting files are located in the directory dist
.
All grunt tasks can be run by npm. See the script
section of package.json
. Open a shell, make sure the environment is set, cd into the forked grunt-jsonfile directory and run:
npm run all
for a complete build run with testing, code coverage and library creation.npm run build
for a quick build of the grunt-jsonfile library.npm run coverage
for running code coverage.npm run test
for running tests.
Do you feel this guide is missing essential information? Found any typos or amused by the translation? Please do not hesitate to file an issue on github!