Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在我的 lineman application.js 文件中添加一个 grunt 任务(特别是 angular-template)。这里和这里有一些文档。但是,它只是告诉我将 grunt 任务添加到loadNpmTasks. 问题是,从使用 lineman 创建的新项目中,我的 application.js 文件没有loadNpmTasks数组,注释也没有指出我应该把它放在哪里。我在文档中找到的两个示例都没有显示 application.js 文件的完整外观。
loadNpmTasks
application.js 文件应如下所示(显然 src/dest 选项配置不正确:
module.exports = function(lineman) { return { loadNpmTasks:['grunt-angular-templates'], ngtemplates: { app: { src: '**.html', dest: 'templates.js' } } }; };
然后运行任务:
lineman grunt ngtemplates