gulp-task-loader icon indicating copy to clipboard operation
gulp-task-loader copied to clipboard

Feature/flexible option dir path

Open paquettea opened this issue 9 years ago • 1 comments

The current way of handling the path is forcing the opts.dir to be a relative path based on process.cwd. My change keeps the functionality but also enables to specify an absolute path.

Mainly, I changed the way that the path is provided to loadTask to generate a resolved/normalized version of the parameter, and than the rest of the process uses that path (instead of having a variable in loadTasks that is used for fsStats and then constructed another way in loadTask, using process.cwd() for modulePath).

This change is preserving the current way of providing the parameter.

I also added the possibility to provide a gulp instance in the options. This enables the usage of gulp-task-loader as a sub dependency in another module. Basically I'm using it to create a build template module. Instead of generating the builds pattern with a tool like yeoman, I'm installing my tasks as a module, and than all the apps that uses it can be update without changing their sources.

I know that you are favorizing simplicity over complexity, but I do not think those changes introduce anymore complexity, it's only adding to flexibility .

paquettea avatar Dec 05 '16 22:12 paquettea

Wow, so sorry bout the super late reply! I'm not maintaining this anymore. Wanna take over?

hontas avatar Sep 29 '17 20:09 hontas