Sfoglia il codice sorgente

Build CommonJS just like any other target, using "pre" and "post" wrappers

tags/0.3.0
Jason Smith 16 anni fa
parent
commit
43587531c8
4 ha cambiato i file con 17 aggiunte e 2 eliminazioni
  1. +1
    -0
      .gitignore
  2. +3
    -2
      Rakefile
  3. +7
    -0
      mustache-commonjs/commonjs.mustache.js.tpl.post
  4. +6
    -0
      mustache-commonjs/commonjs.mustache.js.tpl.pre

+ 1
- 0
.gitignore Vedi File

@@ -2,3 +2,4 @@ runner.js
jquery.mustache.js
dojox
yui3
commonjs.mustache.js

+ 3
- 2
Rakefile Vedi File

@@ -14,8 +14,9 @@ task :spec
desc "Package for CommonJS"
task :commonjs do
puts "Packaging for CommonJS"
`mkdir lib`
`cp mustache.js lib/mustache.js`
source = "mustache-commonjs"
target_jq = "commonjs.mustache.js"
`cat #{source}/#{target_jq}.tpl.pre mustache.js #{source}/#{target_jq}.tpl.post > #{target_jq}`
puts "Done."
end



+ 7
- 0
mustache-commonjs/commonjs.mustache.js.tpl.post Vedi File

@@ -0,0 +1,7 @@

exports.name = Mustache.name;
exports.version = Mustache.version;

exports.to_html = function() {
return Mustache.to_html.apply(this, arguments);
};

+ 6
- 0
mustache-commonjs/commonjs.mustache.js.tpl.pre Vedi File

@@ -0,0 +1,6 @@
/*
* CommonJS-compatible mustache.js module
*
* See http://github.com/janl/mustache.js for more info.
*/


Loading…
Annulla
Salva