Skip to content
This repository
Browse code

fix rakefile

  • Loading branch information...
commit 9abbaedb13221063ff34c6c8707033463bd207bc 1 parent 7c35cbc
Thomas Fuchs authored

Showing 2 changed files with 14 additions and 10 deletions. Show diff stats Hide diff stats

  1. +13 7 Rakefile
  2. +1 3 src/experimental.js
20 Rakefile
@@ -34,7 +34,7 @@ def sprocketize(path, source, destination=nil)
34 34 puts "\nand you should be all set.\n\n"
35 35 end
36 36
37   - puts "Sprocketizing..."
  37 + puts "Sprocketizing (#{[*source].join(', ')})..."
38 38 secretary = Sprockets::Secretary.new(
39 39 :root => File.join(SCRIPTY2_ROOT, path),
40 40 :load_path => [SCRIPTY2_SRC_DIR],
@@ -94,19 +94,25 @@ task :min do
94 94 minify File.join(SCRIPTY2_ROOT,'lib','prototype.js'), File.join(SCRIPTY2_RELEASE_DIR,'prototype.min.js')
95 95 end
96 96
  97 +def unify_distribution
  98 + unified = IO.read(File.join(SCRIPTY2_DIST_DIR,'prototype.js')) + IO.read(File.join(SCRIPTY2_DIST_DIR,'s2.js'))
  99 + File.open(File.join(SCRIPTY2_RELEASE_DIR,'prototype.s2.js'), 'w') do |file|
  100 + file.write unified
  101 + end
  102 + minify File.join(SCRIPTY2_RELEASE_DIR,'prototype.s2.js'), File.join(SCRIPTY2_DIST_DIR,'prototype.s2.min.js')
  103 +end
  104 +
97 105 desc "Generate a unified minified version of Prototype and scripty2"
98 106 task :unified => ['unified:default']
99 107 namespace :unified do
100 108 task :default => [:dist, :min] do
101   - unified = IO.read(File.join(SCRIPTY2_DIST_DIR,'prototype.js')) + IO.read(File.join(SCRIPTY2_DIST_DIR,'s2.js'))
102   - File.open(File.join(SCRIPTY2_RELEASE_DIR,'prototype.s2.js'), 'w') do |file|
103   - file.write unified
104   - end
105   - minify File.join(SCRIPTY2_RELEASE_DIR,'prototype.s2.js'), File.join(SCRIPTY2_DIST_DIR,'prototype.s2.min.js')
  109 + unify_distribution
106 110 end
107 111
108 112 desc "Generate a unified minified version of Prototype and scripty2, including experimental UI controls."
109   - task :experimental => ['dist:experimental', :min, :unified]
  113 + task :experimental => ['dist:experimental', :min] do
  114 + unify_distribution
  115 + end
110 116 end
111 117
112 118 def doc_from_sources(sources)
4 src/experimental.js
... ... @@ -1,3 +1 @@
1   -
2   -
3   -//= require "ui"
  1 +//= require "ui"

0 comments on commit 9abbaed

Please sign in to comment.
Something went wrong with that request. Please try again.