Skip to content

Instantly share code, notes, and snippets.

@ydaniv
Created March 10, 2013 07:53
Show Gist options
  • Save ydaniv/5127552 to your computer and use it in GitHub Desktop.
Save ydaniv/5127552 to your computer and use it in GitHub Desktop.
Example of a build config for the r.js optimizer, in a typical UIjet app
({
// appDir : "use if creating a proper app according to RequireJS' conventions",
baseUrl : 'path/to/base',
// dir : "use if we're outputting a directory",
optimize : 'uglify',
paths : {
plugins : '../../lib',
mustache : '../../lib/mustache',
common : '../common',
ui : 'ui',
widgets : '../widgets'
//....
},
optimizeCss : 'none', // optimizing CSS separately but can also be done together - in that case need to output to a dir
removeCombined : false, // since we're using 'out' and not 'dir' it doesn't copy the source so don't remove it
keepBuildDir: true, // probably not needed here
out : 'path/to/dist/main-0.1.4.js',
name: 'main',
include: [
'widgets/Pane',
'widgets/Button',
'widgets/Form',
'widgets/List',
'widgets/Bar',
'mixins/Templated',
'mixins/Scrolled',
'mixins/Transitioned',
'adapters/iScroll'
]
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment