Wednesday, 10 May 2017

Is there a way to run gulp as interactive prompt?

Significant amount of time taken by running Gulp task falls on such things like:

  • loading gulp tasks;
  • importing node modules.

This can be optimized if instead of running each time gulp task_name we will run something that will load gulpfile.js and start prompt where we can run gulp task by entering its name. This will allow to spend time on loading gulp tasks only once and imported node modules will be cached by require and loaded much faster on subsequent task executions.

How can this be implemented?

This is self-answered question where I share my knowledge with community.
Other answers are welcome. Best answer will be accepted.



via mixel

No comments:

Post a Comment