Skip to content

Latest commit

 

History

History
42 lines (28 loc) · 2.49 KB

grunt.md

File metadata and controls

42 lines (28 loc) · 2.49 KB

make targets of gruntfile.js and package.json

This guide assumes, that you are familiar with the use of git, npm and grunt.

  1. git fork grunt-jsonfile plugin for grunt (https://github.com/db-developer/grunt-jsonfile.git)
  2. cd into forked grunt-jsonfile directory
  3. open a shell
  4. make sure your environment knows about the paths to nodejs
  5. run npm install

testing

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

code coverage

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.

api docs

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.

building

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.

npm integration

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.

feedback

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!