0.1.2rc7 • Published 11 years ago
grunt-build-requirejs v0.1.2rc7
grunt-build-requirejs
Use r.js to build all the require.js projects of a directorys
Getting Started
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. Once you're familiar with that process, install this plugin with this command:
npm install grunt-build-requirejs --save-dev
Requirejs task
Run this task with the grunt requirejs
command.
This task is a multi task so any targets, files and options should be specified according to the multi task documentation.
This plugin is compatible with grunt 0.4.0rc7
The plugin will look for the build files and compile them into the specified destination.
Options
For a full list of possible options, see the r.js example build file.
Usage Examples
// path/to/main.build.json
{
"paths": {
"dependency": "test-dependency"
},
"modules": [{"name": "test1"},{"name": "test2"}]
}
// Gruntfile.js
requirejs: {
compile: {
options: {
//common options for all build files
}
files:[
{
expand: true,
cwd: root + components,
src: ['**/*.build.json'],
dest: root + compiled
}
]
}
}
Release History
- 2013-01-22 v0.1.0rc7 Creation of the plugin, work with grunt 0.4.0rc7