Answer the question
In order to leave comments, you need to log in
How do you store different gulp/grunt tasks?
Hello!
A bunch of different taskfiles have accumulated, in some sass, in some less, in some other 100500 plugins.
For now, I'm thinking of creating one universal file and not needing to comment on each individual project.
Maybe something more interesting can be done?
Thank you.
Answer the question
In order to leave comments, you need to log in
Transfer tasks to separate files, put them in one module and keep them in a repository on github or bitbucket. Do as needed
require('my-task-collection').sassTask(inDir, outDir, options)
.
Gulp/Grunt is powered by Node.js. And the node knows how to import ! That's all, all tasks can be sorted into files in a separate folder.
see how gulp-angular-generator stores tasks. Very comfortable and flexible structure.
You can touch it like this:
npm install -g yo gulp bower
npm install -g yo gulp bower
mkdir test
cd test
yo gulp-angular
See how it's done here: https://github.com/unlight/gulpfile/tree/task-angular
Divided by type - file.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question