T
T
Think With Your Head2015-10-14 13:31:40
JavaScript
Think With Your Head, 2015-10-14 13:31:40

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

4 answer(s)
K
Konstantin Kitmanov, 2015-10-14
@k12th

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)
.

D
Denis Ineshin, 2015-10-14
@IonDen

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.

B
bromzh, 2015-10-14
@bromzh

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

In the gulp folder, there are tasks divided by files. In Gulpfile, all files from the gulp folder are automatically picked up.

C
ChickenGrinder, 2015-10-14
@ChickenGrinder

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 question

Ask a Question

731 491 924 answers to any question