Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a global instance for each module which any of other modules can access #14

Open
carloshpds opened this issue Dec 21, 2015 · 0 comments

Comments

@carloshpds
Copy link
Contributor

That's a huge refactoring. To make sense, we need to analyse each file and transform the tasks into a functions that will be exported like an API which other modules can access by something like this:

options.modulesData.module.instance.task()

pros:

  • Do not need to use require to access a module anymore, so.. new external modules can access other modules more easily than currently.
  • We can make contextual changes, like compile only the file which has changed.
  • Do not need to use gulp.start() anymore, preventing some trouble in the future cause gulp team will remove this method soon. gulp#505 gulp#355
  • It will make possible to test tasks.

cons:

  • It will take a lot time to get done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant