Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I started working on a setup for using an Assetfile with an ember project, this is based on the peepcode tutorial and added the build tools, see: <a href="https://github.com/pixelhandler/peepcode-ordr" rel="nofollow">https://github.com/pixelhandler/peepcode-ordr</a></p> <p>As for compiling coffee script this is an example doing that... <a href="https://github.com/OC-Emberjs/peepcode-ordr-test/blob/assetmanager/Assetfile" rel="nofollow">https://github.com/OC-Emberjs/peepcode-ordr-test/blob/assetmanager/Assetfile</a></p> <pre><code># Assetfile require 'rake-pipeline-web-filters' output "public" input "js/tests" do match "**/*.coffee" do coffee_script concat "tests.js" end end # vim:ft=ruby </code></pre> <p>And precompiling the Handlebars templates like so...</p> <pre><code># Assetfile # See Getting Started readme # - https://github.com/livingsocial/rake-pipeline/blob/master/GETTING_STARTED.md # See Assetfile examples: # - https://gist.github.com/dudleyf/1557811 # - https://github.com/ryanto/ryanto.github.com/blob/master/Assetfile require "rake-pipeline-web-filters" output "public" class HandlebarsFilter &lt; Rake::Pipeline::Filter def generate_output(inputs, output) inputs.each do |input| # for sub-templates we can't really use '/' in a filename so using '__' instead, then replacing name = File.basename(input.fullpath, ".handlebars").sub(/__/, "/") output.write "return Ember.TEMPLATES['#{name}'] = Ember.Handlebars.compile(#{input.read.to_json})" end end end input "app/templates" do match "**/*.handlebars" do filter HandlebarsFilter name = proc { |input| File.basename(input.fullpath, ".handlebars").sub(/__/, "/") + "_template" } minispade :module_id_generator =&gt; name concat "js/templates.js" end end # vim:ft=ruby </code></pre> <p>Here is an example file I used to start from: <a href="https://github.com/hjr3/dasfd/blob/master/Assetfile" rel="nofollow">https://github.com/hjr3/dasfd/blob/master/Assetfile</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload