+
Skip to content

Modularize Gulp file (once Gulp 4 is released?) #162

Open
@azasypkin

Description

@azasypkin

Our gulpfile became too big so it would be better to modularize it. On of the approaches is to have something like this:

──root
     │
     ├──tasks
     │    │
     │    └──build.js
     │    │
     │    ├──sw.js
     │    │
     │    └──tests.js
     │    
     └──gulpfile.js
            │
            ├──gulp.task('build', .....)
            │
            ├──gulp.task('test', .....)
            │
            └──gulp.task('default', ....)

We can use gulp-hub or gulp 4 registry API (preferable) [1], [2], [3]. So having that, I think it would be better to wait until Gulp 4 is ready unless it takes too much time for Gulp Team to release it :)

[1] https://github.com/bradcerasani/gulp-4--split-tasks
[2] https://github.com/gulpjs/gulp/blob/4.0/docs/API.md#gulpregistryregistry
[3] https://github.com/gulpjs/undertaker

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

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载