watch parameter when compiling to javascript
Coffeescript lets you add a 'watch' parameter so you can do something like -wc and it keeps recompiling the coffeescript scripts to javascript whenever changes are applied to them. This would be nice to have with Spider
I think that shouldn't be built-in into compiler. Compiler is compiler. Watcher is watcher. It's pretty easy to watch files using gulp.js or even Grunt.
@oxysoft have you seen gulp.js?
var gulp = require('gulp'),
watch = require('gulp-watch'),
spider = require('gulp-spider-script');
var Path = {
spiderSrc: 'src/*.spider,
spiderDest: 'out/js'
};
gulp.task('watch', function() {
return gulp.src(Path.spiderSrc)
.pipe(watch({glob: Path.spiderSrc}))
.pipe(spider())
.pipe(gulp.dest(Path.spiderDest))
});
Hi, I tried your suggestion and it would appear to have worked but gulp-spider-script only supports version 0.0.4 of Spider and changing it to the latest version will not work. Perhaps if the author updated it? This is my first time using gulp so there is no way I can update it myself.
I think this definitely should be put into the compiler. There's no reason I should have to pull in Grunt or Gulp just to accomplish a simple task. Grunt/Gulp is designed for making complicated actions easier without using make, not for providing basic, useful functionality.