Socket
Socket
Sign inDemoInstall

parcel-reporter-multiple-static-file-copier

Package Overview
Dependencies
6
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    parcel-reporter-multiple-static-file-copier

Parcel v2 plugin. Enables the copy of multiple static files and folders into the specified folder on build success.


Version published
Weekly downloads
22
increased by69.23%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

parcel-reporter-multiple-static-file-copier

This is a plugin for Parcel v2 that copies multiple specified files and folders into specified folders once build finishes successfully (Event: buildSuccess).

Inspired by this plugin.

Install

Yarn

$ yarn add -D parcel-reporter-multiple-static-file-copier

NPM

$ npm install parcel-reporter-multiple-static-file-copier --save-dev

Usage

Configuration is set under multipleStaticFilesCopier in package.json.

staticFilesCopy must be an array of objects containing origin and destination props:

PropertyPath
originExample: node_modules/@package/public
destinationExample: dist/public

⚠️ You must add the plugin name in .parcelrc config file:

.parcelrc

{
  "reporters": [
    "...",
    "parcel-reporter-static-files-copier"
  ]
}

*Note that the "..." notation is used to keep the default report plugins loaded by Parcel.

Example

This example will copy the contents of the folder public into the folder dist/public. (Note that both public and dist are in the project root)

package.json

{
  "multipleStaticFilesCopier": [
    {
      "origin": "public",
      "destination": "dist/public/"
    }
  ]
}

Todo

  • Add event type prop in configuration.

Keywords

FAQs

Last updated on 11 Apr 2021

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc