buildr-uncompressed.coffee 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. # Requires
  2. buildr = require 'buildr'
  3. util = require 'util'
  4. # Options
  5. options =
  6. watch: false
  7. compress: false
  8. # Configs
  9. configs =
  10. standard:
  11. # Options
  12. name: 'standard'
  13. watch: options.watch
  14. # Paths
  15. srcPath: __dirname+'/scripts/uncompressed'
  16. # Checking
  17. checkScripts: true
  18. jshintOptions:
  19. browser: true
  20. laxbreak: true
  21. boss: true
  22. undef: true
  23. onevar: true
  24. strict: true
  25. noarg: true
  26. # Compression (without outPath only the generated bundle files are compressed)
  27. compressScripts: options.compress # Array or true or false
  28. other: [
  29. # -----------------------------
  30. # Dojo Toolkit
  31. {
  32. # Options
  33. name: 'html4+html5+dojo'
  34. watch: options.watch
  35. # Paths
  36. srcPath: __dirname+'/scripts/uncompressed'
  37. # Compression (without outPath only the generated bundle files are compressed)
  38. compressScripts: options.compress # Array or true or false
  39. # Order
  40. scriptsOrder: [
  41. 'json2.js'
  42. 'history.adapter.dojo.js'
  43. 'history.html4.js'
  44. 'history.js'
  45. ]
  46. # Bundling
  47. bundleScriptPath: __dirname+'/scripts/bundled-uncompressed/html4+html5/dojo.history.js'
  48. }
  49. {
  50. # Options
  51. name: 'html5+dojo'
  52. watch: options.watch
  53. # Paths
  54. srcPath: __dirname+'/scripts/uncompressed'
  55. # Compression (without outPath only the generated bundle files are compressed)
  56. compressScripts: options.compress # Array or true or false
  57. # Order
  58. scriptsOrder: [
  59. 'history.adapter.dojo.js'
  60. 'history.js'
  61. ]
  62. # Bundling
  63. bundleScriptPath: __dirname+'/scripts/bundled-uncompressed/html5/dojo.history.js'
  64. }
  65. # -----------------------------
  66. # ExtJS
  67. {
  68. # Options
  69. name: 'html4+html5+extjs'
  70. watch: options.watch
  71. # Paths
  72. srcPath: __dirname+'/scripts/uncompressed'
  73. # Compression (without outPath only the generated bundle files are compressed)
  74. compressScripts: options.compress # Array or true or false
  75. # Order
  76. scriptsOrder: [
  77. 'json2.js'
  78. 'history.adapter.extjs.js'
  79. 'history.html4.js'
  80. 'history.js'
  81. ]
  82. # Bundling
  83. bundleScriptPath: __dirname+'/scripts/bundled-uncompressed/html4+html5/extjs.history.js'
  84. }
  85. {
  86. # Options
  87. name: 'html5+extjs'
  88. watch: options.watch
  89. # Paths
  90. srcPath: __dirname+'/scripts/uncompressed'
  91. # Compression (without outPath only the generated bundle files are compressed)
  92. compressScripts: options.compress # Array or true or false
  93. # Order
  94. scriptsOrder: [
  95. 'history.adapter.extjs.js'
  96. 'history.js'
  97. ]
  98. # Bundling
  99. bundleScriptPath: __dirname+'/scripts/bundled-uncompressed/html5/extjs.history.js'
  100. }
  101. # -----------------------------
  102. # JQUERY
  103. {
  104. # Options
  105. name: 'html4+html5+jquery'
  106. watch: options.watch
  107. # Paths
  108. srcPath: __dirname+'/scripts/uncompressed'
  109. # Compression (without outPath only the generated bundle files are compressed)
  110. compressScripts: options.compress # Array or true or false
  111. # Order
  112. scriptsOrder: [
  113. 'json2.js'
  114. 'history.adapter.jquery.js'
  115. 'history.html4.js'
  116. 'history.js'
  117. ]
  118. # Bundling
  119. bundleScriptPath: __dirname+'/scripts/bundled-uncompressed/html4+html5/jquery.history.js'
  120. }
  121. {
  122. # Options
  123. name: 'html5+jquery'
  124. watch: options.watch
  125. # Paths
  126. srcPath: __dirname+'/scripts/uncompressed'
  127. # Compression (without outPath only the generated bundle files are compressed)
  128. compressScripts: options.compress # Array or true or false
  129. # Order
  130. scriptsOrder: [
  131. 'history.adapter.jquery.js'
  132. 'history.js'
  133. ]
  134. # Bundling
  135. bundleScriptPath: __dirname+'/scripts/bundled-uncompressed/html5/jquery.history.js'
  136. }
  137. # -----------------------------
  138. # MOOTOOLS
  139. {
  140. # Options
  141. name: 'html4+html5+mootools'
  142. watch: options.watch
  143. # Paths
  144. srcPath: __dirname+'/scripts/uncompressed'
  145. # Compression (without outPath only the generated bundle files are compressed)
  146. compressScripts: options.compress # Array or true or false
  147. # Order
  148. scriptsOrder: [
  149. 'json2.js'
  150. 'history.adapter.mootools.js'
  151. 'history.html4.js'
  152. 'history.js'
  153. ]
  154. # Bundling
  155. bundleScriptPath: __dirname+'/scripts/bundled-uncompressed/html4+html5/mootools.history.js'
  156. }
  157. {
  158. # Options
  159. name: 'html5+mootools'
  160. watch: options.watch
  161. # Paths
  162. srcPath: __dirname+'/scripts/uncompressed'
  163. # Compression (without outPath only the generated bundle files are compressed)
  164. compressScripts: options.compress # Array or true or false
  165. # Order
  166. scriptsOrder: [
  167. 'history.adapter.mootools.js'
  168. 'history.js'
  169. ]
  170. # Bundling
  171. bundleScriptPath: __dirname+'/scripts/bundled-uncompressed/html5/mootools.history.js'
  172. }
  173. # -----------------------------
  174. # NATIVE
  175. {
  176. # Options
  177. name: 'html4+html5+native'
  178. watch: options.watch
  179. # Paths
  180. srcPath: __dirname+'/scripts/uncompressed'
  181. # Compression (without outPath only the generated bundle files are compressed)
  182. compressScripts: options.compress # Array or true or false
  183. # Order
  184. scriptsOrder: [
  185. 'json2.js'
  186. 'history.adapter.native.js'
  187. 'history.html4.js'
  188. 'history.js'
  189. ]
  190. # Bundling
  191. bundleScriptPath: __dirname+'/scripts/bundled-uncompressed/html4+html5/native.history.js'
  192. }
  193. {
  194. # Options
  195. name: 'html5+native'
  196. watch: options.watch
  197. # Paths
  198. srcPath: __dirname+'/scripts/uncompressed'
  199. # Compression (without outPath only the generated bundle files are compressed)
  200. compressScripts: options.compress # Array or true or false
  201. # Order
  202. scriptsOrder: [
  203. 'history.adapter.native.js'
  204. 'history.js'
  205. ]
  206. # Bundling
  207. bundleScriptPath: __dirname+'/scripts/bundled-uncompressed/html5/native.history.js'
  208. }
  209. # -----------------------------
  210. # RIGHT.JS
  211. {
  212. # Options
  213. name: 'html4+html5+right'
  214. watch: options.watch
  215. # Paths
  216. srcPath: __dirname+'/scripts/uncompressed'
  217. # Compression (without outPath only the generated bundle files are compressed)
  218. compressScripts: options.compress # Array or true or false
  219. # Order
  220. scriptsOrder: [
  221. 'json2.js'
  222. 'history.adapter.right.js'
  223. 'history.html4.js'
  224. 'history.js'
  225. ]
  226. # Bundling
  227. bundleScriptPath: __dirname+'/scripts/bundled-uncompressed/html4+html5/right.history.js'
  228. }
  229. {
  230. # Options
  231. name: 'html5+right'
  232. watch: options.watch
  233. # Paths
  234. srcPath: __dirname+'/scripts/uncompressed'
  235. # Compression (without outPath only the generated bundle files are compressed)
  236. compressScripts: options.compress # Array or true or false
  237. # Order
  238. scriptsOrder: [
  239. 'history.adapter.right.js'
  240. 'history.js'
  241. ]
  242. # Bundling
  243. bundleScriptPath: __dirname+'/scripts/bundled-uncompressed/html5/right.history.js'
  244. }
  245. # -----------------------------
  246. # ZEPTO
  247. {
  248. # Options
  249. name: 'html4+html5+zepto'
  250. watch: options.watch
  251. # Paths
  252. srcPath: __dirname+'/scripts/uncompressed'
  253. # Compression (without outPath only the generated bundle files are compressed)
  254. compressScripts: options.compress # Array or true or false
  255. # Order
  256. scriptsOrder: [
  257. 'json2.js'
  258. 'history.adapter.zepto.js'
  259. 'history.html4.js'
  260. 'history.js'
  261. ]
  262. # Bundling
  263. bundleScriptPath: __dirname+'/scripts/bundled-uncompressed/html4+html5/zepto.history.js'
  264. }
  265. {
  266. # Options
  267. name: 'html5+zepto'
  268. watch: options.watch
  269. # Paths
  270. srcPath: __dirname+'/scripts/uncompressed'
  271. # Compression (without outPath only the generated bundle files are compressed)
  272. compressScripts: options.compress # Array or true or false
  273. # Order
  274. scriptsOrder: [
  275. 'history.adapter.zepto.js'
  276. 'history.js'
  277. ]
  278. # Bundling
  279. bundleScriptPath: __dirname+'/scripts/bundled-uncompressed/html5/zepto.history.js'
  280. }
  281. ]
  282. # Standard
  283. standardConfig = configs.standard
  284. standardConfig.successHandler = ->
  285. for config in configs.other
  286. buildrInstance = buildr.createInstance config
  287. buildrInstance.process()
  288. # Process
  289. standardBuildr = buildr.createInstance configs.standard
  290. standardBuildr.process()