2014-09-22 62 views
2

到的鏈路Sails JS with EJS but linker to compile handlebars public templates ,它看起來直截了當但不知何故,它不與我目前的帆版本玉石工作Sails.js,灰燼,車把和通過咕嚕-燼模板配置:模板文件未創建

下面是目前咕嚕配置在任務/配置/ emberTemplates.js

module.exports = function (grunt) { 

grunt.config.set('emberTemplates', { 
    dev: { 
    compile: { 
     options: { 
     amd: true, 
     templateBasePath: /assets\/templates\// 
     }, 
     files: { 
     ".tmp/public/templates.js": ['assets/templates/**/*.hbs'] 
    } 
    } 
} 
}); 
    //console.log('loading grunt-ember-template'); 
    grunt.loadNpmTasks('grunt-ember-templates'); 
}; 

我可以看到,任務得到由步兵拿起

> sails lift --prod 

..... 
Grunt :: Running "emberTemplates:dev" (emberTemplates) task 

但是./tmp/public/templates.js文件永遠不會被創建。

我把頭撞在牆上8個小時,不知道該去哪裏。 任何幫助是apreciated。 感謝

回答

2

的問題是開發:部分..只要我刪除了開發:部分它的工作:

module.exports =功能(咕嚕){

grunt.config.set('emberTemplates', { 
    compile: { 
    options: { 
    amd: false, 
    templateBasePath: /assets\/templates\// 
    }, 
    files: { 
    ".tmp/public/templates.js": ['assets/templates/**/*.hbs'] 
    } 
}); 

grunt.loadNpmTasks('grunt-ember-templates'); 
};