There\'s gulp-requirejs plugin, but it\'s blacklisted with the following message: "use the require.js module directly".
The docs are quite sparse, how would I b
To do this without invoking the shell, you can do it like:
var gulp = require('gulp'),
rjs = require('requirejs'),
config = {
baseUrl: '../appDir/scripts',
name: 'main',
out: '../build/main-built.js'
};
gulp.task('scripts', function(cb){
rjs.optimize(config, function(buildResponse){
// console.log('build response', buildResponse);
cb();
}, cb);
});
see: https://github.com/phated/requirejs-example-gulpfile/blob/master/gulpfile.js