Итак, у меня есть проект с макетом
src
--library
----a.coffee
----b.coffee
----c.coffee
--demo
----main.coffee
В настоящее время я настроил grunt, чтобы скомпилировать coffeescript из src/library в промежуточный/библиотеку, объединить результаты в промежуточный/library.js и поместить в dist
Это прекрасно работает, но теперь я хочу также посмотреть src/demo и сделать то же самое, как мне это сделать?
Мой файл grunt:
module.exports = (grunt) ->
grunt.loadNpmTasks("grunt-contrib-coffee")
grunt.loadNpmTasks("grunt-contrib-watch")
grunt.loadNpmTasks("grunt-contrib-concat")
grunt.initConfig
watch:
coffee:
files: "src/library/**/*.coffee"
tasks: ["coffee:compile", "concat"]
coffee:
compile:
expand: true,
flatten: true,
cwd: "src/library",
src: ["**/*.coffee"],
dest: "intermediate/library/",
ext: ".js"
concat:
options:
separator: ";"
dist:
src: ["intermediate/library.js", "intermediate/library/**/*.js"]
dest: "dist/library.js"
grunt.registerTask "default", ["watch"]