Skip to content

Commit

Permalink
Fix MooTools build task
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Feb 24, 2012
1 parent 4e94d04 commit f3e246f
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ be built specifically for several different client libraries and platforms,
including the following:

- [jQuery](http://jquery.com/)
- [MooTools](http://mootools.net/)
- [Dojo](http://www.dojotoolkit.org/)
- [YUI](http://developer.yahoo.com/yui/)
- [RequireJS](http://requirejs.org/)
Expand All @@ -386,6 +387,7 @@ These may be built using [Rake](http://rake.rubyforge.org/) and one of the
following commands:

$ rake jquery
$ rake mootools
$ rake dojo
$ rake yui
$ rake requirejs
Expand Down
12 changes: 10 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,22 @@ def templated_build(name, opts={})

mkdir_p opts[:location] if opts[:location]

sh "cat #{source}/#{target_js}.tpl.pre mustache.js \
#{source}/#{target_js}.tpl.post > #{opts[:location] || '.'}/#{target_js}"
files = [
"#{source}/mustache.js.pre",
'mustache.js',
"#{source}/mustache.js.post"
]

open("#{opts[:location] || '.'}/#{target_js}", 'w') do |f|
files.each {|file| f << File.read(file) }
end

puts "Done, see #{opts[:location] || '.'}/#{target_js}"
end
end

templated_build "jQuery"
templated_build "MooTools"
templated_build "Dojo", :location => "dojox/string"
templated_build "YUI3", :location => "yui3/mustache"
templated_build "RequireJS"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

Object.implement('mustache', function(view, partials){
return Mustache.to_html(view, this, partials);
return Mustache.render(view, this, partials);
});
})();
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f3e246f

Please sign in to comment.