|
|
@@ -9,43 +9,46 @@ Spec::Rake::SpecTask.new(:spec) do |t| |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
desc "Run all specs" |
|
|
desc "Run all specs" |
|
|
task :spec do |
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
task :spec |
|
|
|
|
|
|
|
|
|
|
|
desc "Package for CommonJS" |
|
|
task :commonjs do |
|
|
task :commonjs do |
|
|
print "Packaging for CommonJS\n" |
|
|
|
|
|
|
|
|
puts "Packaging for CommonJS" |
|
|
`mkdir lib` |
|
|
`mkdir lib` |
|
|
`cp mustache.js lib/mustache.js` |
|
|
`cp mustache.js lib/mustache.js` |
|
|
print "Done.\n" |
|
|
|
|
|
|
|
|
puts "Done." |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
desc "Package for jQuery" |
|
|
task :jquery do |
|
|
task :jquery do |
|
|
print "Packaging for jQuery\n" |
|
|
|
|
|
|
|
|
puts "Packaging for jQuery" |
|
|
source = "mustache-jquery" |
|
|
source = "mustache-jquery" |
|
|
target_jq = "jquery.mustache.js" |
|
|
target_jq = "jquery.mustache.js" |
|
|
`cat #{source}/#{target_jq}.tpl.pre mustache.js #{source}/#{target_jq}.tpl.post > #{target_jq}` |
|
|
`cat #{source}/#{target_jq}.tpl.pre mustache.js #{source}/#{target_jq}.tpl.post > #{target_jq}` |
|
|
print "Done, see ./#{target_jq}\n" |
|
|
|
|
|
|
|
|
puts "Done, see ./#{target_jq}" |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
desc "Package for dojo" |
|
|
task :dojo do |
|
|
task :dojo do |
|
|
print "Packaging for dojo\n" |
|
|
|
|
|
|
|
|
puts "Packaging for dojo" |
|
|
source = "mustache-dojo" |
|
|
source = "mustache-dojo" |
|
|
target_js = "mustache.js" |
|
|
target_js = "mustache.js" |
|
|
`mkdir -p dojox; mkdir -p dojox/string` |
|
|
`mkdir -p dojox; mkdir -p dojox/string` |
|
|
`cat #{source}/#{target_js}.tpl.pre mustache.js #{source}/#{target_js}.tpl.post > dojox/string/#{target_js}` |
|
|
`cat #{source}/#{target_js}.tpl.pre mustache.js #{source}/#{target_js}.tpl.post > dojox/string/#{target_js}` |
|
|
print "Done, see ./dojox/string/#{target_js} Include using dojo.require('dojox.string.mustache.'); \n" |
|
|
|
|
|
|
|
|
puts "Done, see ./dojox/string/#{target_js} Include using dojo.require('dojox.string.mustache.'); " |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
desc "Package for YUI3" |
|
|
task :yui3 do |
|
|
task :yui3 do |
|
|
print "Packaging for YUI3\n" |
|
|
|
|
|
|
|
|
puts "Packaging for YUI3" |
|
|
source = "mustache-yui3" |
|
|
source = "mustache-yui3" |
|
|
target_js = "mustache.js" |
|
|
target_js = "mustache.js" |
|
|
`mkdir -p yui3; mkdir -p yui3/mustache` |
|
|
`mkdir -p yui3; mkdir -p yui3/mustache` |
|
|
`cat #{source}/#{target_js}.tpl.pre mustache.js #{source}/#{target_js}.tpl.post > yui3/mustache/#{target_js}` |
|
|
`cat #{source}/#{target_js}.tpl.pre mustache.js #{source}/#{target_js}.tpl.post > yui3/mustache/#{target_js}` |
|
|
print "Done, see ./yui3/mustache/#{target_js}\n" |
|
|
|
|
|
|
|
|
puts "Done, see ./yui3/mustache/#{target_js}" |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
desc "Remove temporary files." |
|
|
task :clean do |
|
|
task :clean do |
|
|
`git clean -fdx` |
|
|
`git clean -fdx` |
|
|
end |
|
|
end |