Rollup plugin to execute arbitrary shell commands during the build process. Version 1.0.9 is the latest stable release. Allows specifying commands as strings or arrays and hooks into any Rollup build hook (default: generateBundle). Supports synchronous and asynchronous execution. Differentiators: minimal API, supports single or multiple commands, flexible hook integration. Designed for tasks like linting, copying files, or running dev servers.
npm install rollup-plugin-shellVerified import paths — ran on the pinned version, not inferred.
Basic usage of rollup-plugin-shell to execute a shell command at the buildStart hook.
Set sync: false (default) to run commands asynchronously.
Use absolute paths or change cwd via ShellJS or other means before invoking.
Always provide at least one command string.
Use `import execute from 'rollup-plugin-shell'` (without braces).
Run `npm install rollup-plugin-shell --save-dev`.