Files

61 lines
1.5 KiB
JavaScript

// 1. Install nodejs (it will automatically installs requirejs)
//- assuming the folder structure for your app is:
// app
// css
// img
// js
// main.js
// index.html
// build
// app.build.js
// r.js (downloaded from requirejs website)
// 2. the command line to run:
// $ node r.js -o app.build.js
//
({
//- paths are relative to this app.build.js file
appDir: "",
baseUrl: "js",
//- this is the directory that the new files will be. it will be created if it doesn't exist
dir: "./app-build_dev",
paths: {
jquery: 'empty:',
underscore: 'libs/underscore-min',
jQueryPlugins: 'libs/jQueryPlugins',
// jqm_alphaList: 'plugins/jquery.mobile.alphascroll.min',
// jq_rating: 'plugins/jquery.rating.pack',
backbone: 'libs/backbone-min',
jqm: 'empty:',
text: 'libs/text'
},
shim: {
jqm: {
deps: [ 'jquery' ]
},
jQueryPlugins: {
deps: [ 'jquery' ]
}
// ,
// jqm_alphaList: {
// deps: [ 'jquery', 'jqm' ]
// }
},
optimize: "none",
//optimize: "uglify2",
modules: [
{
name: "main",
exclude: [
'libs/jQueryPluginsCollection',
'plugins/jquery.mobile.alphascroll.min',
'plugins/jquery.rating.pack'
]
},
{ name: "libs/jQueryPluginsCollection" }
],
preserveLicenseComments: false,
fileExclusionRegExp: /\.git/
})