Commit d60f8b30 authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Add build task which uses Dojo loader instead of requirejs

parent 9ce7719e
......@@ -82,6 +82,17 @@ module.exports = function (grunt) {
dir: outdir
},
dojo: {
dist: {
options: {
dojo: "build/tmp/dojo/dojo.js",
profile: "build.profile.js",
package: ".",
releaseDir: "build/tmp"
}
}
},
// Erase previous build.
clean: {
build: [outdir],
......@@ -99,6 +110,21 @@ module.exports = function (grunt) {
}
},
symlink: {
dojo: {
files: [
{
src: "bower_components/dojo",
dest: "build/tmp/dojo"
},
{
src: "node_modules/dojo-util",
dest: "build/tmp/util"
}
]
}
},
// Config to allow uglify to generate the layer.
uglify: {
options: {
......@@ -150,9 +176,12 @@ module.exports = function (grunt) {
grunt.loadNpmTasks("grunt-contrib-clean");
grunt.loadNpmTasks("grunt-contrib-copy");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-symlink");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-dojo");
grunt.loadNpmTasks("grunt-shell");
grunt.registerTask("build", ["clean", "jshint", "shell:bowerdeps", "amdbuild:amdloader", "amdreportjson:amdbuild", "clean:tmp"]);
grunt.registerTask("default", ["build"]);
grunt.registerTask("build-requirejs", ["clean", "jshint", "shell:bowerdeps", "amdbuild:amdloader", "amdreportjson:amdbuild", "clean:tmp"]);
grunt.registerTask("build-dojo", ["clean", "jshint", "shell:bowerdeps", "symlink:dojo", "dojo:dist", "clean:tmp"]);
grunt.registerTask("default", ["build-requirejs"]);
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment