Closed guillaume86 closed 10 years ago
I never used a .coffee
but I think this could be achievable. I'll try to get one working to see how I can list the tasks, I'll let you know how it goes here.
As you said, the lack of a command to list makes this a bit complex when it shouldn't be (the same happens with a .js
gulpfile, it would be so much easier if I could just do gulp list
).
Actually it was easier than I tought, no need for changes, just exporting in the gulpfile.coffee
module.exports = gulp
and creating the gulp variable in the gulpfile.js did the job
require('coffee-script/register');
var gulp = require('./gulpfile.coffee');
a little page in the wiki would do the job to avoid future requests like this one ;). Thanks for the good work on the plugin!
Awesome!
I took a really different path solving this and it wasn't nice. I was trying to integrate the flag --require coffee-script/register
in the call to gulp
if a .coffee
was found, but it's kind of troublesome, this is a lot better (at least for now).
I'll add the info in the README and wiki, thanks!!
I have to work in a good Wiki page on how to use the package and avoid potential issues, but for now, the info is in the README. I've added a mention to your username there, if you don't like it please let me know :).
Thanks again!
No problem! Le 12 mai 2014 19:03, "Nicolás Santángelo" notifications@github.com a écrit :
I have to work in a good Wiki page on how to use the package and avoid potential issues, but for now, the info is in the README. I've added a mention to your username there, if you don't like it please let me know :).
Thanks again!
— Reply to this email directly or view it on GitHubhttps://github.com/NicoSantangelo/sublime-gulp/issues/5#issuecomment-42858928 .
too bad doesn't have a command to list tasks
Now gulp has a command to list tasks - $ gulp --task-simple
See: https://github.com/gulpjs/gulp/issues/472
This makes the listing a lot easier. I'll take a look to se if I can implement it, I think I should leave the node
version as an option anyways, to support older versions of gulp.
Thanks!
The recommanded pattern for coffeescript gulpfiles is to create a gulpfile.js like this:
And then write the proper gulpfile in gulpfile.coffee. Could you detect this case and just compile in memory the gulpfile to js before extracting the task names? (too bad doesn't have a command to list tasks, would make all this a lot easier)