2014-03-31 56 views
0

我有多個居住在Middleman應用程序中的Ember應用程序。當前目錄結構是中間人應用程序中的Ember車把模板的單獨文件

[app-name] 
    components 
    helpers 
    source 

    assets 
    img 
    css 
    js 
     // jQuery for other pages 
     app.js 

     // An ember app 
     fullscreen 
     components 
     controllers 
     models 
     routes 
     views 
     app.js 

     // Another ember app 
     sandbox 
     components 
     controllers 
     models 
     routes 
     views 
     app.js 

    demos 
    // These currently contain the templates, in script tags 
    fullscreen.erb 
    sandbox.erb 

我想弄清楚如何將模板移出腳本標記。在這一點上,我花了相當多的時間試圖讓各種解決方案的工作:

這最後一個我曾在一些工作點,但現在不能再工作了。

完成此操作的最簡單方法是什麼?我是Sprockets and Rack的新手,這讓我難以理清。

回答

0

一般來說,它不是很難自己建立這個。 U只需要一個JS運行庫,編譯模板,並將它們放入Ember.TEMPLATES。 看看precompilation:和TEMPLATES Hash