Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Optimize RequireJS projects using r.js.
JavaScript
Branch: grunt-0.3-stab…
Pull request Compare This branch is 4 commits ahead, 45 commits behind master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
docs
tasks
test
.gitignore
.travis.yml
AUTHORS
CHANGELOG
LICENSE-MIT
README.md
grunt.js
package.json

README.md

grunt-contrib-requirejs Build Status

Optimize RequireJS projects using r.js.

Getting Started

Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-contrib-requirejs

Then add this line to your project's grunt.js gruntfile:

grunt.loadNpmTasks('grunt-contrib-requirejs');

Overview

Inside your grunt.js file add a section named requirejs. This section specifies the options passed to RequireJS Optimizer.

Parameters

options object

This controls how this task (and its helpers) operate and should contain key:value pairs, see options below.

Options

For a full list of possible options, see the r.js example build file.

Config Example

requirejs: {
  compile: {
    options: {
      baseUrl: "path/to/base",
      mainConfigFile: "path/to/config.js",
      out: "path/to/optimized.js"
    }
  }
}

Task submitted by Tyler Kellen.

Something went wrong with that request. Please try again.