Skip to content

add api for other pipelines #1

@goto-bus-stop

Description

@goto-bus-stop

Some plugins, like factor-bundle and browserify-dynamic-import, create multiple output files. These plugins typically expose an event that you can hook into to change their pipelines. It would be neat to have a simple way to add tinyify's relevant optimizations to a pipeline, maybe like this:

b.on('factor.pipeline', function (file, pipeline) {
  tinyify.applyToPipeline(pipeline)
})

tinyify could also hardcode event handlers like that in the main plugin, to make it a bit easier to use—just add -p tinyify to a project that uses factor-bundle and browserify-dynamic-import and get optimizations on all outputs immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions