From b3005f8f9ff03cff0e9ed920a8b28b444ef75ff1 Mon Sep 17 00:00:00 2001 From: kpdecker Date: Sun, 2 Jun 2013 12:01:17 -0500 Subject: [PATCH] Merge dist build targets --- Rakefile | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/Rakefile b/Rakefile index 1b4cb69a..5a647307 100644 --- a/Rakefile +++ b/Rakefile @@ -91,13 +91,12 @@ file "dist/handlebars.runtime.js" => runtime_deps do |task| build_for_task(task) end -task :build => [:compile] do |task| - # Since the tests are dependent on this always rebuild. +task :dist => [:compile] do |task| Rake::Task["dist/handlebars.js"].execute -end -task :runtime => [:compile] do |task| - # Since the tests are dependent on this always rebuild. Rake::Task["dist/handlebars.runtime.js"].execute + + system "./node_modules/.bin/uglifyjs --comments -o dist/handlebars.min.js dist/handlebars.js" + system "./node_modules/.bin/uglifyjs --comments -o dist/handlebars.runtime.min.js dist/handlebars.runtime.js" end # Updates the various version numbers. @@ -114,15 +113,11 @@ task :version => [] do |task| File.open("handlebars.js.nuspec", "w") do |file| file.puts content.gsub(/.*<\/version>/, "#{version}") end -end -task :minify => [] do |task| - system "./node_modules/.bin/uglifyjs --comments -o dist/handlebars.min.js dist/handlebars.js" - system "./node_modules/.bin/uglifyjs --comments -o dist/handlebars.runtime.min.js dist/handlebars.runtime.js" end desc "build the build and runtime version of handlebars" -task :release => [:version, :build, :runtime, :minify] +task :release => [:version, :dist] directory "vendor"