Closed cksachdev closed 9 years ago
I think that this has to do with require-dir
, I never really tried it and I'm not sure it works correctly.
There's really no way to check if the gulp version you're running from sublime is correct ( I think I'll add something like that later ), but you can force your env vars with exec_args.
I have little time on my hands lately but I'm intending to support require-dir
( #34 ). I need to have a local project to test the package on first.
If you don't mind, how is your gulp project setup?, do you have a gulp
folder with every task in it?
Yes, there is a gulp directory with all the tasks inside it. Refer to screenshot below:
Hello again!
I'm working on a new command to run an arbitrary commands with gulp
, which will allow running -v
if necessary. But in the meantime, if you're running Sublime-gulp 4.5.4
you can define a specific keybinding to:
{ "keys": ["KEYS"], "command": "gulp", "args": { "task_name": "", "task_flag": "-v" } }
Still, I can't seem to recreate the error, my local setup:
gulpfile.js
'use strict';
var gulp = require('gulp');
require('require-dir')('./gulp');
gulp.task('default', ['clean'], function() {
gulp.start('clean');
});
./gulp/clean.js
var gulp = require('gulp'),
rimraf = require('rimraf');
gulp.task('clean', function() {
rimraf.sync('www/dist/main.js');
rimraf.sync('www/dist/main.min.js');
});
Preferences -> Package Settings -> Gulp -> Settings - User (this might not be necessary or different for your environment)
{
"exec_args": {
"path": "/bin:/usr/bin:/usr/local/bin"
}
}
After picking Gulp
on Sublime, I can see clean
and default
. After picking `clean:
Running 'clean'...
[12:53:39] Using gulpfile ~/path/gulpfile.js
[12:53:39] Starting 'clean'...
[12:53:39] Finished 'clean' after 966 μs
So! Things you could try:
exec_args
to your settingsSublimeFixMacPath
and re-try with and without exec_args
If that does not work, please let me know what is inside your build.js
task and your gulp
version.
Let me know and thanks!
This should be working as of Version 5 (v5.0.0). If you have any issues, please let me know ( @ mention me and I'll reopen this issue ).
My Gulp file
I can see the package is loaded.
But when I try to run Gulp, I still get the errors
Is there any way to check and run the commands directly in sublime, to make sure that it has detected the right versions and environment variables needed to run Gulp? I have installed SublimeFixMacPath.