Skip to content

Latest commit

 

History

History
123 lines (77 loc) · 4.27 KB

GruntJS.md

File metadata and controls

123 lines (77 loc) · 4.27 KB

Grunt.js

http://gruntjs.com/

Getting Started

This project requires Grunt to use the requirerd Grunt Plugins and run the specified tasks.

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins.

Main tasks

grunt docs

Generate the projects documentation. Subsequently running clean:docs and jsduck tasks.

grunt dev

Build the project. Subsequently running jshint, clean:dist, chromeManifest:dist, exec:dev and copy:dev tasks.

grunt test

Run the tests. Subsequently running connect task.

grunt build

Build the project. Subsequently running jshint, clean:dist, chromeManifest:dist, exec:production, imagemin, copy:dist, compress and docs tasks.

grunt watch

Watch the project for changes triggeering the grunt dev task.

grunt (default)

See grunt build task.

Subtasks

Subtasks are split into seperate files inside grunt/.

The chromeManifest task

Create the Chrome Dev Tools manifest.json file.

Read more on:

The clean task

  • target clean:dist cleans the dist/ directory. Automatically run for build, dev and watch tasks.
  • target clean:docs cleans the docs/ directory. Automatically run for docs and build tasks.

NOTE: You don't need to run this task or its targets manually.

Read more on:

The compress task

Compress dist/ to package/AppInspector.zip.

Read more on:

The copy task

Copy resources from app/ and app/AppInspector/build/production/AI to dist/.

Read more on:

The exec task

Task to run

  • target exec:dev sencha -q app build -e testing -c
  • target exec:production sencha -q app build -e production commands.

Read more on:

The githooks task

Generates a git pre-commit hook to run the jshint task on every commit, aborting the commit if any linting errors exist.

NOTE: Only run this task once manually using grunt githooks or if adding new hooks. grunt githooks

Read more on:

The imagemin task

Optimise, compress and copy image assets.

Read more on:

The jsduck task

Generate duckumentation!

JSduck

Read more on:

The jshint task

JShint

Lint Gruntfile.js, app/AppInspector/app.js and all *.js files in app/AppInspector/app/. It uses the .jshintrc` file containing the linting rules.

Read more on:

The connect task

Start a connect web server for running the tests on Siesta Lite. It opens the Siesta's test page in your default browser.

The port number will be used in 8333, but if you have already used it, please change it as you like.

Read more on: