A lot of source code files in the format /assets/src/coffee , etc. ( ./child/paths etc.) and I would like to output them to assets/js/ and assets/js/child/paths .
Looks like I came up, but it doesn't work. Using grunt-contrib-coffee and grunt-contrib-watch .
grunt.initConfig watch: coffee: files: '<%= coffee.src %>', tasks: 'coffee:dev' options: nospawn: true coffee: src: 'assets/src/coffee/**/*.coffee' dev: options: sourceMap: true files: [ expand: true cwd: "assets/" src: "/src/coffee/**/*.coffee" dest: "../js/" ext: ".js" ] grunt.loadNpmTasks "grunt-contrib-coffee" grunt.loadNpmTasks 'grunt-contrib-watch'
)
Ok, so the output of this looks like this:
assets/src/coffee/projAlpha/dl.coffee has changed src: assets/src/coffee/projAlpha/dl.coffee dest: assets/js/projAlpha/dl.coffee
but the file actually ends: assets/src/coffee/projAlpha/dl.coffee ... and a coffee script. It should be in assets/js/projAlpha/dl.js
I have a grunt coffee utility to compile all files at once and put them in the right place. I would prefer that they be compiled one at a time, though, since now I have several files, and I'm adding more and more.
jcollum
source share