Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-modules-values-replace

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-modules-values-replace - npm Package Compare versions

Comparing version 3.0.1 to 3.1.0

13

index.js

@@ -135,4 +135,11 @@ const postcss = require('postcss');

const factory = ({ fs = nodeFs, resolve: options = {} } = {}) => async (root, rootResult) => {
const resolver = ResolverFactory.createResolver(Object.assign({ fileSystem: fs }, options));
const factory = ({
fs = nodeFs,
noEmitExports = false,
resolve: resolveOptions = {},
} = {}) => async (root, rootResult) => {
const resolver = ResolverFactory.createResolver(Object.assign(
{ fileSystem: fs },
resolveOptions,
));
const resolve = promisify(resolver.resolve, resolver);

@@ -164,2 +171,4 @@ const readFile = promisify(fs.readFile, fs);

node.params = replaceValueSymbols(node.params, definitions);
} else if (noEmitExports && node.type === 'atrule' && node.name === 'value') {
node.remove();
}

@@ -166,0 +175,0 @@ });

2

package.json
{
"name": "postcss-modules-values-replace",
"version": "3.0.1",
"version": "3.1.0",
"description": "PostCSS plugin to work around CSS Modules values limitations",

@@ -5,0 +5,0 @@ "keywords": [

@@ -83,11 +83,31 @@ # PostCSS Modules Values Replace [![Build Status][ci-img]][ci]

#### fs `Object`
#### fs `Object`
File system to use. To make it faster in webpack pass its file system to plugin.
Cached Node's file system is used by default.
Cached Node's file system is used by default.
#### resolve `Object`
[enhanced-resolve]'s configuration object, see there for possible options and defaults.
[enhanced-resolve]'s configuration object, see there for possible options and defaults.
#### noEmitExports `boolean`
When enabled @value rules/declarations will be removed from the emitted output
**Input:**
```css
@value myBrandColor blue;
@font-face {}
body { background: myBrandColor }
```
**Output:**
```css
@font-face {}
body { background: blue }
```
### calc() and @value

@@ -158,3 +178,3 @@

[postcss-calc] and [postcss-color-function] are known to work *inside* **@value** as they traverse media queries.
Experience with other plugins may differ if they ignore media queries.
Experience with other plugins may differ if they ignore media queries.

@@ -161,0 +181,0 @@ ### Extracting values for programmatic use

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