Skip to content

Instantly share code, notes, and snippets.

@shubik
Created August 20, 2014 21:51
Show Gist options
  • Save shubik/a827c6d9420c5f8addad to your computer and use it in GitHub Desktop.
Save shubik/a827c6d9420c5f8addad to your computer and use it in GitHub Desktop.
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-requirejs');
var debug = !grunt.option('prod');
return {
all: {
options: {
locale : 'en-us',
optimize : debug ? 'none' : 'uglify',
optimizeCss : false,
useStrict : false,
keepBuildDir : false,
preserveLicenseComments : false,
findNestedDependencies : true,
logLevel : 0,
mainConfigFile : '<%= src_path %>/js/config.js',
appDir : '<%= src_path %>/',
dir : '<%= build_path %>/',
baseUrl : './js/app',
fileExclusionRegExp : /^\.|vendor\//,
exclude : [
'react',
'require' // ... and so on ...
],
modules : [],
uglify: {
toplevel : true,
ascii_only : true,
beautify : false,
max_line_length : 1000,
no_mangle : true,
defines : {
DEBUG: ['name', 'false']
}
},
closure: {
CompilerOptions : {},
CompilationLevel : 'SIMPLE_OPTIMIZATIONS',
loggingLevel : 'WARNING'
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment