diff options
| author | Misko Hevery | 2012-01-06 18:10:47 -0800 |
|---|---|---|
| committer | Misko Hevery | 2012-01-10 22:27:00 -0800 |
| commit | 5143e7bf065a3cbdf8400cf095b653d51bc83b8f (patch) | |
| tree | 980149c365d4cb5586d27975d26366a25ff7be6a /Rakefile | |
| parent | afd25446d23f24872eb20ac79c8fbd2cff203ef0 (diff) | |
| download | angular.js-5143e7bf065a3cbdf8400cf095b653d51bc83b8f.tar.bz2 | |
feat(module): new module loader
Diffstat (limited to 'Rakefile')
| -rw-r--r-- | Rakefile | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -109,6 +109,27 @@ task :compile => [:init, :compile_scenario, :compile_jstd_scenario_adapter] do --js_output_file #{path_to('angular.min.js')}) FileUtils.cp_r 'i18n/locale', path_to('i18n') + + File.open(path_to('angular-loader.js'), 'w') do |f| + concat = 'cat ' + [ + 'src/loader.prefix', + 'src/loader.js', + 'src/loader.suffix'].flatten.join(' ') + + content = %x{#{concat}}. + gsub('"NG_VERSION_FULL"', NG_VERSION.full). + gsub(/^\s*['"]use strict['"];?\s*$/, '') # remove all file-specific strict mode flags + + f.write(content) + end + + %x(java -jar lib/closure-compiler/compiler.jar \ + --compilation_level SIMPLE_OPTIMIZATIONS \ + --language_in ECMASCRIPT5_STRICT \ + --js #{path_to('angular-loader.js')} \ + --js_output_file #{path_to('angular-loader.min.js')}) + + end @@ -134,7 +155,9 @@ task :package => [:clean, :compile, :docs] do ['src/angular-mocks.js', path_to('angular.js'), + path_to('angular-loader.js'), path_to('angular.min.js'), + path_to('angular-loader.min.js'), path_to('angular-scenario.js'), path_to('jstd-scenario-adapter.js'), path_to('jstd-scenario-adapter-config.js'), |
