123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281 |
- # Requires
- buildr = require 'buildr'
- util = require 'util'
- # Options
- options =
- watch: false
- compress: true
- # Configs
- configs =
- standard:
- # Options
- name: 'standard'
- watch: options.watch
- # Paths
- srcPath: __dirname+'/scripts/uncompressed'
- outPath: __dirname+'/scripts/compressed'
- # Checking
- checkScripts: true
- jshintOptions:
- browser: true
- laxbreak: true
- boss: true
- undef: true
- onevar: true
- strict: true
- noarg: true
- # Compression (without outPath only the generated bundle files are compressed)
- compressScripts: options.compress # Array or true or false
-
- other: [
- # -----------------------------
- # JQUERY
- {
- # Options
- name: 'html4+html5+jquery'
- watch: options.watch
- # Paths
- srcPath: __dirname+'/scripts/uncompressed'
- # Compression (without outPath only the generated bundle files are compressed)
- compressScripts: options.compress # Array or true or false
- # Order
- scriptsOrder: [
- 'json2.js'
- 'history.adapter.jquery.js'
- 'history.html4.js'
- 'history.js'
- ]
- # Bundling
- bundleScriptPath: __dirname+'/scripts/bundled/html4+html5/jquery.history.js'
- }
- {
- # Options
- name: 'html5+jquery'
- watch: options.watch
- # Paths
- srcPath: __dirname+'/scripts/uncompressed'
- # Compression (without outPath only the generated bundle files are compressed)
- compressScripts: options.compress # Array or true or false
- # Order
- scriptsOrder: [
- 'history.adapter.jquery.js'
- 'history.js'
- ]
- # Bundling
- bundleScriptPath: __dirname+'/scripts/bundled/html5/jquery.history.js'
- }
- # -----------------------------
- # MOOTOOLS
- {
- # Options
- name: 'html4+html5+mootools'
- watch: options.watch
- # Paths
- srcPath: __dirname+'/scripts/uncompressed'
- # Compression (without outPath only the generated bundle files are compressed)
- compressScripts: options.compress # Array or true or false
- # Order
- scriptsOrder: [
- 'json2.js'
- 'history.adapter.mootools.js'
- 'history.html4.js'
- 'history.js'
- ]
- # Bundling
- bundleScriptPath: __dirname+'/scripts/bundled/html4+html5/mootools.history.js'
- }
- {
- # Options
- name: 'html5+mootools'
- watch: options.watch
- # Paths
- srcPath: __dirname+'/scripts/uncompressed'
- # Compression (without outPath only the generated bundle files are compressed)
- compressScripts: options.compress # Array or true or false
- # Order
- scriptsOrder: [
- 'history.adapter.mootools.js'
- 'history.js'
- ]
- # Bundling
- bundleScriptPath: __dirname+'/scripts/bundled/html5/mootools.history.js'
- }
- # -----------------------------
- # NATIVE
- {
- # Options
- name: 'html4+html5+native'
- watch: options.watch
- # Paths
- srcPath: __dirname+'/scripts/uncompressed'
- # Compression (without outPath only the generated bundle files are compressed)
- compressScripts: options.compress # Array or true or false
- # Order
- scriptsOrder: [
- 'json2.js'
- 'history.adapter.native.js'
- 'history.html4.js'
- 'history.js'
- ]
- # Bundling
- bundleScriptPath: __dirname+'/scripts/bundled/html4+html5/native.history.js'
- }
- {
- # Options
- name: 'html5+native'
- watch: options.watch
- # Paths
- srcPath: __dirname+'/scripts/uncompressed'
- # Compression (without outPath only the generated bundle files are compressed)
- compressScripts: options.compress # Array or true or false
- # Order
- scriptsOrder: [
- 'history.adapter.native.js'
- 'history.js'
- ]
- # Bundling
- bundleScriptPath: __dirname+'/scripts/bundled/html5/native.history.js'
- }
- # -----------------------------
- # RIGHT.JS
- {
- # Options
- name: 'html4+html5+right'
- watch: options.watch
- # Paths
- srcPath: __dirname+'/scripts/uncompressed'
- # Compression (without outPath only the generated bundle files are compressed)
- compressScripts: options.compress # Array or true or false
- # Order
- scriptsOrder: [
- 'json2.js'
- 'history.adapter.right.js'
- 'history.html4.js'
- 'history.js'
- ]
- # Bundling
- bundleScriptPath: __dirname+'/scripts/bundled/html4+html5/right.history.js'
- }
- {
- # Options
- name: 'html5+right'
- watch: options.watch
- # Paths
- srcPath: __dirname+'/scripts/uncompressed'
- # Compression (without outPath only the generated bundle files are compressed)
- compressScripts: options.compress # Array or true or false
- # Order
- scriptsOrder: [
- 'history.adapter.right.js'
- 'history.js'
- ]
- # Bundling
- bundleScriptPath: __dirname+'/scripts/bundled/html5/right.history.js'
- }
- # -----------------------------
- # ZEPTO
- {
- # Options
- name: 'html4+html5+zepto'
- watch: options.watch
- # Paths
- srcPath: __dirname+'/scripts/uncompressed'
- # Compression (without outPath only the generated bundle files are compressed)
- compressScripts: options.compress # Array or true or false
- # Order
- scriptsOrder: [
- 'json2.js'
- 'history.adapter.zepto.js'
- 'history.html4.js'
- 'history.js'
- ]
- # Bundling
- bundleScriptPath: __dirname+'/scripts/bundled/html4+html5/zepto.history.js'
- }
- {
- # Options
- name: 'html5+zepto'
- watch: options.watch
- # Paths
- srcPath: __dirname+'/scripts/uncompressed'
- # Compression (without outPath only the generated bundle files are compressed)
- compressScripts: options.compress # Array or true or false
- # Order
- scriptsOrder: [
- 'history.adapter.zepto.js'
- 'history.js'
- ]
- # Bundling
- bundleScriptPath: __dirname+'/scripts/bundled/html5/zepto.history.js'
- }
- ]
- # Standard
- standardConfig = configs.standard
- standardConfig.successHandler = ->
- for config in configs.other
- buildrInstance = buildr.createInstance config
- buildrInstance.process()
- # Process
- standardBuildr = buildr.createInstance configs.standard
- standardBuildr.process()
|