Skip to content

Commit

Permalink
Adding version number + header to backbone-min.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Nov 7, 2010
1 parent ee0cf27 commit 09c7870
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 15 deletions.
7 changes: 6 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
require 'rubygems'
require 'closure-compiler'

HEADER = /((^\s*\/\/.*\n)+)/

desc "rebuild the backbone-min.js files for distribution"
task :build do
source = File.read 'backbone.js'
File.open('backbone-min.js', 'w+') {|f| f.write Closure::Compiler.new.compress(source) }
header = source.match(HEADER)
File.open('backbone-min.js', 'w+') do |file|
file.write header[1].squeeze(' ') + Closure::Compiler.new.compress(source)
end
end

desc "build the docco documentation"
Expand Down
34 changes: 20 additions & 14 deletions backbone-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backbone.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Backbone 0.2.0
// (c) 2010 Jeremy Ashkenas, DocumentCloud Inc.
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
Expand Down

0 comments on commit 09c7870

Please sign in to comment.