There are two primary ways to install DocumentJS so it can be used for a project:
Install DocumentJS as a npm package dependency.
Install DocumentJS globally.
Installing globally allows you to use documentjs command
from anywhere. However, it will not be installed
automatically for npm projects. For this reason, we encourage people to install it as
an npm dependency.
There are two primary ways to install DocumentJS so it can be used for a project:
Installing globally allows you to use documentjs command from anywhere. However, it will not be installed automatically for
npm
projects. For this reason, we encourage people to install it as annpm
dependency.Prerequisites
Install Node.js on your computer.
Installing as an npm package dependency
In your node project's parent folder, run:
Node will copy documentjs's executable to
./node_modules/.bin/documentjs
. On linux/mac, you can run the documentjs command with:Installing globally
Run:
Installing for Grunt
DocumentJS comes with a Grunt task. Simply import it in your
Gruntfile.js
and configure thedocumentjs
task with the docConfig:Installing for Gulp
coming soon