25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

Rakefile 1.4KB

16 yıl önce
16 yıl önce
16 yıl önce
16 yıl önce
16 yıl önce
16 yıl önce
16 yıl önce
16 yıl önce
16 yıl önce
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. require 'rake'
  2. require 'spec/rake/spectask'
  3. task :default => :spec
  4. Spec::Rake::SpecTask.new(:spec) do |t|
  5. #t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
  6. t.spec_files = FileList['test/*_spec.rb']
  7. end
  8. desc "Run all specs"
  9. task :spec do
  10. end
  11. task :commonjs do
  12. print "Packaging for CommonJS\n"
  13. `mkdir lib`
  14. `cp mustache.js lib/mustache.js`
  15. print "Done.\n"
  16. end
  17. task :jquery do
  18. print "Packaging for jQuery\n"
  19. source = "mustache-jquery"
  20. target_jq = "jquery.mustache.js"
  21. `cat #{source}/#{target_jq}.tpl.pre mustache.js #{source}/#{target_jq}.tpl.post > #{target_jq}`
  22. print "Done, see ./#{target_jq}\n"
  23. end
  24. task :dojo do
  25. print "Packaging for dojo\n"
  26. source = "mustache-dojo"
  27. target_js = "mustache.js"
  28. `mkdir -p dojox; mkdir -p dojox/string`
  29. `cat #{source}/#{target_js}.tpl.pre mustache.js #{source}/#{target_js}.tpl.post > dojox/string/#{target_js}`
  30. print "Done, see ./dojox/string/#{target_js} Include using dojo.require('dojox.string.mustache.'); \n"
  31. end
  32. task :yui3 do
  33. print "Packaging for YUI3\n"
  34. source = "mustache-yui3"
  35. target_js = "mustache.js"
  36. `mkdir -p yui3; mkdir -p yui3/mustache`
  37. `cat #{source}/#{target_js}.tpl.pre mustache.js #{source}/#{target_js}.tpl.post > yui3/mustache/#{target_js}`
  38. print "Done, see ./yui3/mustache/#{target_js}\n"
  39. end
  40. task :clean do
  41. `for file in \`cat .gitignore\`; do rm -rf $file; done`
  42. end