You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mucaho edited this page May 20, 2017
·
15 revisions
These instructions assume you've already cloned the Crafty repo on your machine, and are for developers interested in contributing to the project. Others can just download the most recent versions of Crafty here.
If necessary, install node and its package manager npm. Crafty is currently tested with node v6.
Use npm to globally install the grunt commandline tool: npm install grunt-cli -g. (You might need elevated permissions for a global install.)
Install the packages Crafty uses to build by running npm install in Crafty's root directory. (The one with package.json.) This step will pull in about 30MB of required node modules and their dependencies, and place them in the node_modules directory of the project.
Note: You can also use yarn instead of npm, and indeed it's a bit faster. Using yarn will also guarantee you get the package versions specified in the yarn.lock file.
That's it! Now you can use these commands:
grunt: builds crafty.js and validates it.
grunt api: builds the documentation
grunt view-api: builds the documentation, and opens it in your default browser
grunt check: runs tests and lints
grunt uglify: minifies crafty.js
grunt release: builds crafty.js, crafty-min.js, and the documentation