| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env node | 1 #!/usr/bin/env node |
| 2 | 2 |
| 3 /* | 3 /* |
| 4 * We aggregate and minimize the JavaScript sources in order to improve the | 4 * We aggregate and minimize the JavaScript sources in order to improve the |
| 5 * load speed of the application. | 5 * load speed of the application. |
| 6 * | 6 * |
| 7 * We don't want to use the YUI combo loader feature because we want to be able | 7 * We don't want to use the YUI combo loader feature because we want to be able |
| 8 * to run from only static files and we want to be able to run behind a | 8 * to run from only static files and we want to be able to run behind a |
| 9 * firewall without access to the internet. | 9 * firewall without access to the internet. |
| 10 * | 10 * |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 40 // are included in index.html separately as part of charm configuration, | 40 // are included in index.html separately as part of charm configuration, |
| 41 // and should not also be included in the minification. | 41 // and should not also be included in the minification. |
| 42 var paths = merge.readdir(syspath.join(process.cwd(), 'app'), | 42 var paths = merge.readdir(syspath.join(process.cwd(), 'app'), |
| 43 [syspath.join(process.cwd(), 'app/assets'), | 43 [syspath.join(process.cwd(), 'app/assets'), |
| 44 syspath.join(process.cwd(), 'app/modules-debug.js'), | 44 syspath.join(process.cwd(), 'app/modules-debug.js'), |
| 45 syspath.join(process.cwd(), 'app/config.js'), | 45 syspath.join(process.cwd(), 'app/config.js'), |
| 46 syspath.join(process.cwd(), 'app/config-debug.js')]); | 46 syspath.join(process.cwd(), 'app/config-debug.js')]); |
| 47 | 47 |
| 48 // templates.js is a generated file. It is not part of the app directory. | 48 // templates.js is a generated file. It is not part of the app directory. |
| 49 paths.push(syspath.join(process.cwd(), 'build/juju-ui/templates.js')); | 49 paths.push(syspath.join(process.cwd(), 'build/juju-ui/templates.js')); |
| 50 paths.push(syspath.join(process.cwd(), 'app/models/charm.js')); | |
|
gary.poster
2012/12/14 21:18:37
As we discussed, please either figure out why read
benji
2012/12/14 21:43:32
Done.
| |
| 50 | 51 |
| 51 merge.combineJs(paths, 'build/juju-ui/assets/app.js'); | 52 merge.combineJs(paths, 'build/juju-ui/assets/app.js'); |
| 52 | 53 |
| 53 // Get the paths to the YUI modules that we use. | 54 // Get the paths to the YUI modules that we use. |
| 54 var reqs = merge.loadRequires(paths); | 55 var reqs = merge.loadRequires(paths); |
| 55 | 56 |
| 56 // For some reason the loader does not get these requirements. | 57 // For some reason the loader does not get these requirements. |
| 57 // (Known issue #2) | 58 // (Known issue #2) |
| 58 reqs.push('lang/datatype-date-format_en-US'); | 59 reqs.push('lang/datatype-date-format_en-US'); |
| 59 reqs.push('parallel'); | 60 reqs.push('parallel'); |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 73 'app/assets/javascripts/svg-layouts.js']); | 74 'app/assets/javascripts/svg-layouts.js']); |
| 74 | 75 |
| 75 merge.combineJs(filesToLoad.js, 'build/juju-ui/assets/all-yui.js'); | 76 merge.combineJs(filesToLoad.js, 'build/juju-ui/assets/all-yui.js'); |
| 76 | 77 |
| 77 var cssFiles = filesToLoad.css; | 78 var cssFiles = filesToLoad.css; |
| 78 cssFiles.push('app/assets/stylesheets/bootstrap-2.0.4.css'); | 79 cssFiles.push('app/assets/stylesheets/bootstrap-2.0.4.css'); |
| 79 cssFiles.push('app/assets/stylesheets/bootstrap-responsive-2.0.4.css'); | 80 cssFiles.push('app/assets/stylesheets/bootstrap-responsive-2.0.4.css'); |
| 80 merge.combineCSS(cssFiles, | 81 merge.combineCSS(cssFiles, |
| 81 'build/juju-ui/assets/combined-css/all-static.css'); | 82 'build/juju-ui/assets/combined-css/all-static.css'); |
| 82 }); | 83 }); |
| OLD | NEW |