Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/audinue/rollup-plugin-execute
Execute shell command(s) sequentially when the bundle is generated.
https://github.com/audinue/rollup-plugin-execute
Last synced: 3 months ago
JSON representation
Execute shell command(s) sequentially when the bundle is generated.
- Host: GitHub
- URL: https://github.com/audinue/rollup-plugin-execute
- Owner: audinue
- Created: 2017-04-23T16:41:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-13T01:25:12.000Z (almost 5 years ago)
- Last Synced: 2024-07-09T10:10:37.814Z (4 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 25
- Watchers: 2
- Forks: 6
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - execute - Execute shell commands sequentially during a build. (Plugins / Workflow)
README
# rollup-plugin-execute
Execute shell command(s) sequentially when the bundle is generated.
```
npm i rollup-plugin-execute -D
```## Examples
```javascript
// 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/')
]
}
``````javascript
// 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!