Skip to content

gruntjs/grunt-contrib-requirejs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Optimize RequireJS projects using r.js.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 14