0.0.7 • Published 4 years ago
parcel-reporter-exec v0.0.7
parcel-reporter-exec
Execute a command after a successful Parcel build. This is useful when you want to e.g. automatically start your application when parcel watch successfully built your application.
Installation
Install the plugin via yarn.
yarn add --dev parcel-reporter-execAlternatively, install it with npm.
npm install --save-dev parcel-reporter-execUsage
Create a .parcelrc file in your project root.
touch .parcelrcPaste the following content.
{
"extends": "@parcel/config-default",
"reporters": ["...", "parcel-reporter-exec"]
}Update your package.json.
{
// ...
"scripts": {
"dev": "PARCEL_EXEC=\"yarn start\" parcel watch --no-hmr",
"start": "node dist/index.js"
}
// ...
}