Answer the question
In order to leave comments, you need to log in
Which is more efficient: npm script VS gulp task?
The question is actually going to be a bit broader.
At some point, I realized that tasks in npm and gulp are not the same thing, that layout automation can be done using both npm and gulp tools.
That is, in package.json in the "scripts" section, you can write something like this:
And in gulpfile.js:
"build-css": "cat static/pages/*.css tabs/*/*.css"
gulp.task('styles', function() {
gulp.src(['css/**/*.css'])
.pipe(styl({compress : true}))
.pipe(gulp.dest('build'))
.pipe(refresh(server))
});
Answer the question
In order to leave comments, you need to log in
Do not confuse green with soft.
Package manager and task runner.
They have completely different purposes. And the fact that you can write a command to call any script in package.json does not make them similar at all.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question