I have a node script and I want to run a gulp task I have in the same script, how can I call it?
#!/usr/bin/env node var gulp = require('gulp'); gulp.task('default', function (arg) { }); // How do I call the task 'default'
in the Before launch area and choose Run Gulp task from the list. In the Gulp task dialog that opens, specify the Gulpfile. js where the required task is defined, select the task to execute, and specify the arguments to pass to the Gulp tool. Specify the location of the Node.
Install Gulp into your local project To install Gulp locally, navigate to your project directory and run npm install gulp . You can save it to your package. json dependencies by running npm install gulp --save-dev . Once you have Gulp installed locally, you can then proceed to create your gulpfile.
Eventually I found the way:
gulp.start('default');
Use an array in start
method, in the case someone is looking for a way of running multiple tasks from search engines.
gulp.start( [ 'task1', 'task2' ] );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With