Skip to content

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

@carloshpds

Description

@carloshpds

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions