rpe
rollup-plugin-execute
npm i rollup-plugin-execute
rpe

rollup-plugin-execute

Execute shell command(s) sequentially when the bundle is generated.

by Audi Nugraha

1.1.1 (see all)License:MITTypeScript:Not Found
npm i rollup-plugin-execute
Readme

rollup-plugin-execute

Execute shell command(s) sequentially when the bundle is generated.

npm i rollup-plugin-execute -D

Examples

// rollup.config.js
import execute from 'rollup-plugin-execute'

export default {
    entry: 'src/app.js',
    dest: 'public/app.js',
    plugins: [
        // Open the browser when the bundle is generated
        execute('start chrome --new-window http://localhost/')
    ]
}
// rollup.config.js
import execute from 'rollup-plugin-execute'
import path from 'path'

export default {
    entry: 'src/app.js',
    dest: 'public/app.js',
    plugins: [
        execute([
            // Copy index.html from src to public if index.html is not modified
            'robocopy src public index.html',
            // Then open the browser
            'start firefox -new-window "' + path.join(process.cwd(), 'public', 'index.html') + '"'
        ])
    ]
}

Enjoy!

Downloads/wk

3.3K

GitHub Stars

21

LAST COMMIT

3yrs ago

MAINTAINERS

1

CONTRIBUTORS

2

OPEN ISSUES

5

OPEN PRs

2
VersionTagPublished
1.1.1
latest
3yrs ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate