1.0.0 • Published 6 years ago

parcel-plugin-shell v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

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,
    }
}
ParameterDescriptionDefault value
onBuildStartArray of scripts to be executed before starting the bundling[]
onBuildEndArray of scripts to be executed after bundling completes[]
onBuildExitArray of scripts to be executed once the entire build process finishes[]
devTo disable execution of scripts in development modefalse
safeTo switch script execution process from spawn to execfalse

License

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