node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org ยป


plumber-requirejs Build Status

RequireJS compilation operation for Plumber pipelines.


var requirejs = require('plumber-requirejs');

module.exports = function(pipelines) {

    pipelines['compile'] = [
          paths: {
            // Help resolve paths
            'lodash-modern': '../bower_components/lodash-amd/modern',

            // Not compiled in
            moment: 'empty:'
        // ... more pipeline operations




Compile each input JavaScript input resource using RequireJS (or r.js). The resulting JavaScript resource will include all the AMD dependencies of the original resource.

Optionally, custom options can be passed to RequireJS (see the example build file for a full list).

Note that you should not specify input/output configuration options, such as name, out or baseUrl; these are automatically inferred and managed by the input resources.

Source maps for all input resources will be updated or generated accordingly.