Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
296 views
in Technique[技术] by (71.8m points)

javascript - Gulp 4 - How to import tasks from multiple files?

i'm searching a solution for automate, import tasks from differents files to my Gulpfile.js

By using :

const file_to_import = require('./tasks/my_task_one');
task('myTaskOne', file_to_import.myTaskOne);

It work fine but i'd like to import all my tasks in one shoot with a foreach for example. It is possible or i'm absolutly needing to write them one by one in my gulpfile.js

Thanks in advance


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...