25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 년 전
16 년 전
16 년 전
16 년 전
16 년 전
16 년 전
16 년 전
16 년 전
1234567891011121314151617181920212223242526272829303132
  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 :clean do
  25. `for file in \`cat .gitignore\`; do rm -rf $file; done`
  26. end