Files
pathfinder/node_modules/.bin/build.js
2014-11-30 17:26:08 +01:00

131 lines
5.1 KiB
JavaScript

({
//The top level directory that contains your app. If this option is used
//then it assumed your scripts are in a subdirectory under this path.
//This option is not required. If it is not specified, then baseUrl
//below is the anchor point for finding things. If this option is specified,
//then all the files from the app directory will be copied to the dir:
//output area, and baseUrl will assume to be a relative path under
//this directory.
appDir: "../../js",
//By default, all modules are located relative to this path. If baseUrl
//is not explicitly set, then all modules are loaded relative to
//the directory that holds the build file. If appDir is set, then
//baseUrl should be specified as relative to the appDir.
baseUrl: "./",
//List the modules that will be optimized. All their immediate and deep
//dependencies will be included in the module's file when the build is
//done. If that module or any of its dependencies includes i18n bundles,
//only the root bundles will be included unless the locale: section is set above.
modules: [
//Just specifying a module name means that module will be converted into
//a built file that contains all of its dependencies. If that module or any
//of its dependencies includes i18n bundles, they may not be included in the
//built file unless the locale: section is set above.
{
name: "app/main",
exclude: [
// "jquery",
// "jqueryUI",
// "jsPlumb"
]
}
],
"paths": {
layout: "layout",
jquery: "lib/jquery-1.11.1.min",
//jquery: "lib/jquery-2.1.1.min",
//jqueryUI: "lib/jquery-ui.min",
jqueryUI: "lib/jquery-ui-custom.min", // custom script (without tooltip -> conflict with bootstrap)
bootstrap: "lib/bootstrap.min",
text: "lib/requirejs/text",
templates: "../templates",
jsPlumb: "lib/jsPlumb-1.6.4-min", // main map draw plugin
customScrollbar: "lib/jquery.mCustomScrollbar.concat.min", // custom scroll bars
datatables: "lib/jquery.dataTables.min", // tables
datatablesBootstrap: "lib/dataTables.bootstrap", // not used (bootstrap style)
xEditable: "lib/bootstrap-editable.min", // in placed editing
morris: "lib/morris.min", // graphs
raphael: "lib/raphael-min", // required for morris (dependency)
bootbox: "lib/bootbox.min" // custom dialogs
},
shim: {
jqueryUI: {
export: '$',
deps: ['jquery']
},
bootstrap: {
deps: ['jquery', 'jqueryUI']
},
customScrollbar: {
deps: ['jquery']
},
datatables: {
deps: ['jquery']
},
datatablesBootstrap: {
deps: ['datatables']
},
xEditable: {
deps: ['bootstrap']
},
bootbox: {
deps: ['jquery', 'bootstrap'],
exports: 'bootbox'
},
morris: {
deps: ['jquery', 'raphael'],
exports: 'Morris'
}
},
//How to optimize all the JS files in the build output directory.
//Right now only the following values
//are supported:
//- "uglify": (default) uses UglifyJS to minify the code.
//- "uglify2": in version 2.1.2+. Uses UglifyJS2.
//- "closure": uses Google's Closure Compiler in simple optimization
//mode to minify the code. Only available if running the optimizer using
//Java.
//- "closure.keepLines": Same as closure option, but keeps line returns
//in the minified files.
//- "none": no minification will be done.
optimize: "uglify2",
//If using UglifyJS2 for script optimization, these config options can be
//used to pass configuration values to UglifyJS2.
//For possible `output` values see:
//https://github.com/mishoo/UglifyJS2#beautifier-options
//For possible `compress` values see:
//https://github.com/mishoo/UglifyJS2#compressor-options
uglify2: {
//Example of a specialized config. If you are fine
//with the default options, no need to specify
//any of these properties.
output: {
beautify: false,
comments: false
},
compress: {
sequences: false,
drop_console: true,
global_defs: {
DEBUG: false
}
},
warnings: true,
mangle: true
},
//The directory path to save the output. If not specified, then
//the path will default to be a directory called "build" as a sibling
//to the build file. All relative paths are relative to the build file.
dir: "../../build_js",
//Inlines the text for any text! dependencies, to avoid the separate
//async XMLHttpRequest calls to load those dependencies.
inlineText: false
})