Skip to content

Execute on other hooks #3

@GerkinDev

Description

@GerkinDev

Hi,

I'm willing to execute commands on hook writeBundle instead of onGenerate. Would you be OK for a PR to accept an object with hooks to bind as key, and command string as parameter? Something like this:

export default {
    entry: 'src/app.js',
    dest: 'public/app.js',
    plugins: [
        // Open the browser when the bundle is generated
        execute({
            generateBundle: 'echo "Bundle generated"',
            writeBundle 'echo "Bundle written"',
    ]
}

What do you think about this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions