Skip to content

Instantly share code, notes, and snippets.

@watert
Created November 18, 2015 03:05
Show Gist options
  • Save watert/c6882c2104b4ccdfb196 to your computer and use it in GitHub Desktop.
Save watert/c6882c2104b4ccdfb196 to your computer and use it in GitHub Desktop.
gulp requirejs example
var gulp = require("gulp");
gulp.task("rjs",function(cb){
var rjs = require("requirejs");
var config = {
baseUrl:"../scripts",
name:"main",
// optimize: "none",
mainConfigFile:"../scripts/require-config.js",
out:"../res/bundle.js",
include:[
"views/baseview",
"template/mod/common",
"views/index/portal",
"template/index/portal",
]
};
rjs.optimize(config, function(){
cb();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment