Socket
Book a DemoInstallSign in
Socket

parcel-plugin-css-regex-replace

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parcel-plugin-css-regex-replace

Parcel plugin to replace text in CSS files by regular expression

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

📦🚀 parcel-plugin-css-regex-replace

A Parcel plugin to replace text in CSS files by regular expression.

Installation

npm install parcel-plugin-css-regex-replace -s
or
yarn add parcel-plugin-css-regex-replace --dev

Example

css-regex-replace.config.js

module.exports = {
  regexs: [
    {
      replace: /(\/\*! normalize.css v\d[^]*)(\/\* Our styles \*\/)/m,
      with: '$2'
    }
  ]
};

This would remove normalize.css from any included file (that also contains "/* Our styles */"). This is useful if you're using a different reset library (or preloading normalize.css yourself) and want to load Tachyons or Bootstrap without modifying their CSS file manually.

License

MIT License

Keywords

parcel

FAQs

Package last updated on 11 Jan 2019

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