🚀 DAY 4 OF LAUNCH WEEK: Introducing GitHub Actions Scanning Support.Learn more →
Socket
Book a DemoInstallSign in
Socket

parcel-reporter-entries

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parcel-reporter-entries

This plugin allows to link entry assets and bundle files.

latest
Source
npmnpm
Version
2.10.3-rc.2
Version published
Weekly downloads
51
2450%
Maintainers
1
Weekly downloads
 
Created
Source

This plugin allows to link entry assets and bundle files.

Why?

It's side effect of another useful plugin - https://github.com/ol-loginov/parcel-namer-rewrite (it able to change bundle names).

After renaming (hashing) you may want to get changed file names.

Configuration

Plugin takes all config from package.json file. Example of config is below:

{
    "name": "...",
    "version": "...",
    "description": "",

  
    "parcel-reporter-entries": {
        "file": "src/main/resources/application-bundle.yml",
        "assetRoot": "src/webapp/scripts" /* path to relativize input assets against */,
        "yml-write": "array",
        "yml-parent": "app/some/parent",
        "yml-array-from": "from",
        "yml-array-to": "to",
    }
}

This example:

  • write report to 'src/main/resources/application-bundle.yml'.
  • it creates YAML with array of file names and put it under "app" element of YAML.
    • "yml-write": "array" | "map". When "array" - files are written like objects in array. When "map" - files are written like key-value of some object
    • "yml-parent": slash-separated path to element where to put file names map
    • "yml-array-from": for "array" mode - field for asset file name
    • "yml-array-to": for "array" mode - field for bundle file name
  • It uses assetRoot to make relative input asset name. If input assets is 'src/webapp/source/test/script1.js' and assetRootis "src/webapp", then only "source/test/script1.js" will be print as input asset file path

Options for output

yml-write"array" or "map"When "array" - files are written like objects in array. When "map" - files are written like key-value of some object
yml-parentstringSlash-separated path to element where to put file names map
yml-array-fromstring for "array" mode - field for asset file name
yml-array-tostring for "array" mode - field for bundle file name
from-prefixstringAdd prefix for asset file name
from-suffixstringAdd suffix for asset file name
to-prefixstringAdd prefix for bundle file name
to-suffixstringAdd suffix for bundle file name

FAQs

Package last updated on 16 Nov 2023

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