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.1KB

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
12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 :clean do
  33. `for file in \`cat .gitignore\`; do rm -rf $file; done`
  34. end