Open yoiang opened 8 years ago
Actually it never came up as a desired feature but I like the idea. The problem is that the package has to run the gulpfile
in order to get the tasks and be able to list them.
ES6 gulp
from the command line?Gulp: Run arbitrary task
works?By having the babel transpiler present using gulp
directly (gulp run <blah>
) works with our ES6 gulpfile
.
This looks like an accurate tutorial to how we set ours up: http://macr.ae/article/gulp-and-babel.html
Hello again!
I created a test project with:
├── gulpfile.babel.js
├── .babelrc
Which has
$ cat .babelrc
{
"presets": ["es2015"]
}
$ cat gulpfile.babel.js
import gulp from 'gulp';
gulp.task('default', () => console.log('Default task called'));
and I installed npm i --save babel-register babel-preset-es2015
After doing that, I can run gulp
from both the command line and Sublime:
Am I missing something?
That worked a ok running through the plugin?
Huh, then something else is messing with this on our end...
In the spirit of troubleshooting this, your gulpfile is called gulpfile.bebel.js
?
I run into the save problem as you using ES6 and a gulpfile called gulpfile.js
Arg, my mistake: so executing the default task or an arbitrary task works but getting a list of tasks does not, it seems to be creating a .sublime-gulp-tmp.js
file, where this error is occuring.
Sublime Gulp
works by creating a .sublime-gulp-tmp.js
from which it extracts the gulp
tasks.
The weird thing is that it looks like ES6 is being recognized in your project, but another issue makes it blow up, because the error says SyntaxError: Unexpected reserved word
instead of SyntaxError: Unexpected token import
.
If you don't mind, could you paste your gulpfile.babel.js
here? (removing any sensible parts, if any) so I can give it a go
Hey @NicoSantangelo !
My gulpfile is written in ES6 and I'm encountering this error:
It looks like sublime-gulp doesn't support ES6 at the moment. Are there plans in the future? Or is it another issue?