rollup-plugin-execute

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


Summary

Project Name rollup-plugin-execute Project Url https://github.com/audinue/rollup-plugin-execute#readme
InceptionYear 2017-04-23 16:48:18 更新时间 2019-08-05 13:47:54
IssueManagement https://github.com/audinue/rollup-plugin-execute/issues Licenses MIT
仓库地址 git+https://github.com/audinue/rollup-plugin-execute.git 用户数 0
Node Engine 文件大小 1.1 KB
install test

项目介绍

# 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!