aboutsummaryrefslogtreecommitdiffstats
path: root/Rakefile
diff options
context:
space:
mode:
authorMisko Hevery2010-05-25 14:23:52 -0700
committerMisko Hevery2010-05-25 14:23:52 -0700
commit5992e81b2e302c3b3375567e347227f6a9496585 (patch)
tree754f22bc649905c5265f66e8f78a0b5d49e9af38 /Rakefile
parent2cce1ffc15ae6483da9cf354f7a5d2d26317427e (diff)
downloadangular.js-5992e81b2e302c3b3375567e347227f6a9496585.tar.bz2
added rake task to create a single file for scenario runner
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile26
1 files changed, 24 insertions, 2 deletions
diff --git a/Rakefile b/Rakefile
index 6f6ee8ad..a6edb860 100644
--- a/Rakefile
+++ b/Rakefile
@@ -3,7 +3,7 @@ include FileUtils
task :default => [:compile, :test]
desc 'Generate Externs'
-task :compileexterns do
+task :compile_externs do
out = File.new("externs.js", "w")
out.write("function _(){};\n")
@@ -29,9 +29,31 @@ task :compileexterns do
out.close
end
+desc 'Compile Scenario'
+task :compile_scenario do
+ concat = %x(cat \
+ lib/underscore/underscore.js \
+ lib/jquery/jquery-1.4.2.js \
+ src/scenario/angular.prefix \
+ src/Angular.js \
+ src/JSON.js \
+ src/scenario/Runner.js \
+ src/scenario/DSL.js \
+ src/scenario/angular.suffix \
+ )
+ css = %x(cat css/angular-scenario.css)
+ f = File.new("angular-scenario.js", 'w')
+ f.write(concat)
+ f.write('document.write(\'<style type="text/css">\n')
+ f.write(css.gsub(/'/, "\\'").gsub(/\n/, "\\n"));
+ f.write('\n</style>\');')
+ f.close
+end
+
desc 'Compile JavaScript'
task :compile do
- Rake::Task['compileexterns'].execute 0
+ Rake::Task['compile_externs'].execute 0
+ Rake::Task['compile_scenario'].execute 0
concat = %x(cat \
src/angular.prefix \