Package Exports
- rollup-plugin-execute
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rollup-plugin-execute) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
rollup-plugin-execute
Execute shell command(s) sequentially when the bundle is generated.
npm i rollup-plugin-execute -DExamples
// 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!