我正在开发一个ember-cli
项目,我正在开发一个系统,该系统允许我解析尚未加载的模板,并且可能存在于项目结构之外。
我想在我的dist/assets
目录中有一个名为的文件夹templates
,该文件夹内将包含来自app/templates/external
. 这是我目前Brocfile.js
对西兰花炖菜的尝试
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var stew = require("broccoli-stew");
var app = new EmberApp({
vendorFiles: {
"jquery.js": null
},
sassOptions: {
includePaths: [
'bower_components/bourbon/app/assets/stylesheets/',
'bower_components/neat/app/assets/stylesheets/',
'bower_components/bitters/app/assets/stylesheets/'
]
}
});
var additionalTrees = [];
var templateFiles = stew.find(appTree, "assets/app/templates/external");
templateFiles = stew.mv(templateFiles, "assets/app/templates/external", "assets/templates");
additionalTrees.push(templateFiles);
module.exports = app.toTree(additionalTrees);