Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watch parameter when compiling to javascript #113

Open
oxysoft opened this issue Dec 2, 2014 · 3 comments
Open

watch parameter when compiling to javascript #113

oxysoft opened this issue Dec 2, 2014 · 3 comments

Comments

@oxysoft
Copy link

oxysoft commented Dec 2, 2014

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

@Namek
Copy link
Collaborator

Namek commented Dec 3, 2014

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))
});

@oxysoft
Copy link
Author

oxysoft commented Dec 5, 2014

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.

@zekesonxx
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants