New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@eirikb/parcel-transformer-mustache

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eirikb/parcel-transformer-mustache

parcel-transformer-mustache <a href="https:

  • 0.1.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

parcel-transformer-mustache


Mustache transformer for Parcel 2. Supports .env-file.

Usage - config package

The config package has default values set up so you need less config in .parcelrc.

  • Matches all *.mustache.* files.
    Such as manifest.mustache.xml.
    This pattern helps you IDE associate the file ending,
    but it was also the only pattern I was able to use as Parcel 2 Namer.
  • Matched files are renamed without .mustache.-part.
    E.g., manifest.mustache.xml becomes manifest.xml.

Install:

npm i -D @eirikb/parcel-config-mustache

.parcelrc:

{
  "extends": [
    "@parcel/config-default",
    "@eirikb/parcel-config-mustache"
  ]
}

Run:

parcel build manifest.mustache.xml

Usage - transformer

This is how you can use the transformer directly.
For example transforming manifest.xml:

Install:

npm i -D @eirikb/parcel-transformer-mustache

.parcelrc:

{
  "extends": "@parcel/config-default",
  "transformers": {
    "manifest.xml": [
      "@eirikb/parcel-transformer-mustache"
    ]
  }
}

Run:

parcel build manifest.xml

Note: You can change "manifest.xml" in .parcelrc with anything you like, it also supports wildcards. Note that this approach will not rename the file, e.g., if you input file.mustache it will be named file.mustache (in dist).js

URL

You can add URL to other assets, such as images by using {{#url}}image.png{{/url}}.

.json-files

If you put a .json-file alongside your other file it should be included as view data: manifest.xml
or
manifest.mustache.xml
and
manifest.json

FAQs

Package last updated on 03 Apr 2021

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc