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.

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
123456789101112131415161718192021222324252627282930313233343536373839404142
  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 = "dojo.mustache.js"
  28. `cat #{source}/#{target_js}.tpl.pre mustache.js #{source}/#{target_js}.tpl.post > #{target_js}`
  29. print "Done, see ./#{target_js}\n"
  30. end
  31. task :clean do
  32. `for file in \`cat .gitignore\`; do rm -rf $file; done`
  33. end