New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rollup-plugin-shell

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-shell

Execute shell commands in Rollup.

latest
npmnpm
Version
1.0.9
Version published
Weekly downloads
2.7K
-10.26%
Maintainers
1
Weekly downloads
 
Created
Source

rollup-plugin-shell

Execute shell commands in Rollup.

Install

npm i rollup-plugin-shell --save-dev

Options

NameTypeDefaultDescription
commandsarray<string>undefinedAn array of shell commands that will be executed. This is required, since no commands would run.
hookstringgenerateBundleAny Rollup hook - https://rollupjs.org/guide/en/#build-hooks.
syncbooleanfalseSpawns the child process asynchronously, without blocking the event loop. Sync true blocks the event loop until the spawned process either exits or is terminated.

Example:

import execute from "rollup-plugin-shell";

export default {
  input: "src/index.js",
  output: {
    file: "dist/index.js",
  },
  plugins: [
    // Run mulitple commands with a specific rollup hook
    execute({ commands: ["eslint src"], hook: "buildStart" }),

    // Run multiple commands with the default rollup hook
    execute([
      "copyfiles dist/**/* example/package -u 1",
      "live-server --watch=example --open=example",
    ]),

    // Run a single command with the default rollup hook
    execute("npm run test"),
  ],
};

Keywords

rollup

FAQs

Package last updated on 30 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts