[484] | 1 | # grunt-dojo |
---|
| 2 | |
---|
| 3 | Build Dojo inside a Grunt task |
---|
| 4 | |
---|
| 5 | ## Compatibility |
---|
| 6 | |
---|
| 7 | grunt-dojo `~0.2.0` works with Grunt `~0.4.0` |
---|
| 8 | |
---|
| 9 | For Grunt `~0.3.0`: use `grunt-dojo@0.1.3` |
---|
| 10 | |
---|
| 11 | ## Getting Started |
---|
| 12 | Install this grunt plugin next to your project's [grunt.js gruntfile][getting_started] with: `npm install grunt-dojo` |
---|
| 13 | |
---|
| 14 | Then add this line to your project's `grunt.js` gruntfile: |
---|
| 15 | |
---|
| 16 | ```javascript |
---|
| 17 | grunt.loadNpmTasks('grunt-dojo'); |
---|
| 18 | ``` |
---|
| 19 | |
---|
| 20 | [grunt]: http://gruntjs.com/ |
---|
| 21 | [getting_started]: https://github.com/gruntjs/grunt/blob/master/docs/getting_started.md |
---|
| 22 | |
---|
| 23 | ## Usage |
---|
| 24 | |
---|
| 25 | ```javascript |
---|
| 26 | dojo: { |
---|
| 27 | dist: { |
---|
| 28 | options: { |
---|
| 29 | dojo: 'path/to/dojo.js', // Path to dojo.js file in dojo source |
---|
| 30 | load: 'build', // Optional: Utility to bootstrap (Default: 'build') |
---|
| 31 | profile: 'app.profile.js', // Profile for build |
---|
| 32 | appConfigFile: '', // Optional: Config file for dojox/app |
---|
| 33 | package: '', // Optional: Location to search package.json (Default: nothing) |
---|
| 34 | packages [], // Optional: Array of locations of package.json (Default: nothing) |
---|
| 35 | require: '', // Optional: Module to require for the build (Default: nothing) |
---|
| 36 | requires [], // Optional: Array of modules to require for the build (Default: nothing) |
---|
| 37 | cwd: './', // Directory to execute build within |
---|
| 38 | dojoConfig: '' // Optional: Location of dojoConfig (Default: null), |
---|
| 39 | // Optional: Base Path to pass at the command line |
---|
| 40 | // Takes precedence over other basePaths |
---|
| 41 | // Default: null |
---|
| 42 | basePath: '' |
---|
| 43 | } |
---|
| 44 | }, |
---|
| 45 | options: { |
---|
| 46 | // You can also specify options to be used in all your tasks |
---|
| 47 | dojo: 'path/to/dojo.js', // Path to dojo.js file in dojo source |
---|
| 48 | load: 'build', // Optional: Utility to bootstrap (Default: 'build') |
---|
| 49 | profile: 'app.profile.js', // Profile for build |
---|
| 50 | appConfigFile: '', // Optional: Config file for dojox/app |
---|
| 51 | package: '', // Optional: Location to search package.json (Default: nothing) |
---|
| 52 | packages [], // Optional: Array of locations of package.json (Default: nothing) |
---|
| 53 | require: '', // Optional: Module to require for the build (Default: nothing) |
---|
| 54 | requires [], // Optional: Array of modules to require for the build (Default: nothing) |
---|
| 55 | cwd: './', // Directory to execute build within |
---|
| 56 | dojoConfig: '' // Optional: Location of dojoConfig (Default: null), |
---|
| 57 | // Optional: Base Path to pass at the command line |
---|
| 58 | // Takes precedence over other basePaths |
---|
| 59 | // Default: null |
---|
| 60 | basePath: '' |
---|
| 61 | } |
---|
| 62 | } |
---|
| 63 | ``` |
---|
| 64 | |
---|
| 65 | ## Contributing |
---|
| 66 | In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt][grunt]. |
---|
| 67 | |
---|
| 68 | ## Release History |
---|
| 69 | _(Nothing yet)_ |
---|
| 70 | |
---|
| 71 | ## License |
---|
| 72 | Copyright (c) 2013 Blaine Bublitz |
---|
| 73 | Licensed under the MIT license. |
---|