rollup-plugin-execute
Execute shell command(s) sequentially when the bundle is generated.
npm i rollup-plugin-execute -D
Examples
import execute from 'rollup-plugin-execute'
export default {
entry: 'src/app.js',
dest: 'public/app.js',
plugins: [
execute('start chrome --new-window http://localhost/')
]
}
import execute from 'rollup-plugin-execute'
import path from 'path'
export default {
entry: 'src/app.js',
dest: 'public/app.js',
plugins: [
execute([
'robocopy src public index.html',
'start firefox -new-window "' + path.join(process.cwd(), 'public', 'index.html') + '"'
])
]
}
Enjoy!