parcel-plugin-shell

1.0.0 • Public • Published

parcel-plugin-shell npm version

Plugin to run shell commands before/after bundling process.


【What is Parcel】

Installation

Parcel will automatically start using the plugin once its added to your package.json file.

To add the plugin to your existing project, run the below command.

npm i parcel-plugin-shell -D

or

yarn add parcel-plugin-shell -D

Configuration

The plugin allows to configure the scripts that need to be executed. The supported parameters are as follows:

// package.json
{
    ...
    "shell": {
        "onBuildStart": [ "echo Starting Build" ],
        "onBuildEnd": [ "node copy.js" ],
        "onBuildExit": [ "npm run serve" ],
        "dev": false,
        "safe": false,
    }
}
Parameter Description Default value
onBuildStart Array of scripts to be executed before starting the bundling []
onBuildEnd Array of scripts to be executed after bundling completes []
onBuildExit Array of scripts to be executed once the entire build process finishes []
dev To disable execution of scripts in development mode false
safe To switch script execution process from spawn to exec false

License

This project is licensed under the MIT License - see the LICENSE file for details

Readme

Keywords

none

Package Sidebar

Install

npm i parcel-plugin-shell

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

5.51 kB

Total Files

5

Last publish

Collaborators

  • apvarun