Skip to content

Instantly share code, notes, and snippets.

@justinph
Created January 21, 2014 22:55
Show Gist options
  • Save justinph/8550173 to your computer and use it in GitHub Desktop.
Save justinph/8550173 to your computer and use it in GitHub Desktop.
requirejs: {
compile: {
options: {
baseUrl: "public_html/js",
dir: "public_html/js-built",
mainConfigFile: "public_html/js/init.js",
optimize: "uglify2",
skipDirOptimize: true,
preserveLicenseComments: false,
separateCSS: true,
//we require require.js, to be built into itself, but not in the init, so we set it up here
paths: {
'requirejs': "../vendor/requirejs/require",
},
modules: [{
name: 'init',
include: [
'requirejs',
'jquery',
'jquery-pjax',
'jquery-cookie',
'scrollMonitor',
'css',
]
}, {
name: 'app/story',
exclude: ['init']
}, {
name: 'app/weather',
exclude: ['init']
}],
}
}
},
modernizr: {
devFile: 'public_html/vendor/modernizr/modernizr.js',
outputFile: 'public_html/js-built/modernizr.min.js',
extra: {
shiv: true,
mq: true,
history: true,
svg: true,
load: false
},
uglify: true,
// Files
files: ['public_html/js/init.js', 'public_html/js/app/*.js', 'public_html/js/app/**/*.js', 'app/less/**/*.less']
},
less: {
dev: {
options: {
sourceMap: true,
relativeUrls: false,
report: 'min',
},
files: {
'public_html/assets/css/main.css': 'app/less/main.less',
'public_html/assets/css/story.css': 'app/less/story.less',
'public_html/assets/css/weather.css': 'app/less/weather.less',
}
},
prod: {
options: {
compress: true,
relativeUrls: false
},
files: {
'public_html/assets/css/main.min.css': 'app/less/main.less',
'public_html/assets/css/story.min.css': 'app/less/story.less',
'public_html/assets/css/weather.min.css': 'app/less/weather.less',
}
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment