【发布时间】:2013-07-22 04:38:39
【问题描述】:
我有几个文件名为:
- jquery.a.b.coffee
- jquery.a.c.coffee
- jquery.a.d.coffee
它们都被编译到我的输出目录中的一个jquery.js 文件中。
虽然我猜这种行为在某些情况下可能很好,但我想让它们编译成不同的文件,如 jquery.a.b.js、jquery.a.c.js 等。我如何告诉 grunt-contrib-coffeescript 这样做?
我的 Gruntfile.js 看起来像这样:
module.exports = function (grunt) {
grunt.initConfig({
coffee: {
dist: {
files: [{
expand: true,
flatten: true,
cwd: 'app/webroot/coffee',
src: ['{,*/}*.coffee'],
dest: 'app/webroot/js',
ext: '.js'
}]
}
}
});
grunt.loadNpmTasks('grunt-contrib-coffee');
};
感谢您的帮助!
【问题讨论】:
标签: coffeescript gruntjs