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

esbuild-style-plugin

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-style-plugin - npm Package Compare versions

Comparing version 1.3.1 to 1.4.0

7

dist/index.d.ts

@@ -1,2 +0,2 @@

import { AcceptedPlugin } from 'postcss';
import { AcceptedPlugin, ProcessOptions } from 'postcss';
import { PluginBuild } from 'esbuild';

@@ -6,2 +6,5 @@ import CssModulesOptions from './postcssModulesOptions';

import { RenderOptions } from './utils';
interface PostCSS extends ProcessOptions {
plugins: AcceptedPlugin[];
}
interface PluginOptions {

@@ -11,3 +14,3 @@ extract?: boolean;

cssModulesOptions?: CssModulesOptions;
postcss?: AcceptedPlugin[];
postcss?: PostCSS;
postcssConfigFile?: string | boolean;

@@ -14,0 +17,0 @@ renderOptions?: RenderOptions;

@@ -155,3 +155,3 @@ var __create = Object.create;

let mapping = { data: {} };
let plugins = options.postcss || [];
let { plugins = [], ...processOptions } = options.postcss || {};
let injectMapping = false;

@@ -164,3 +164,3 @@ let contents = "";

if (plugins.length > 0) {
const result = await (0, import_postcss.default)(plugins).process(css, { from: args.path });
const result = await (0, import_postcss.default)(plugins).process(css, { ...processOptions, from: args.path });
css = result.css;

@@ -187,7 +187,4 @@ watchFiles = [...watchFiles, ...getPostCSSWatchFiles(result)];

if (options.postcssConfigFile) {
const { plugins } = await importPostcssConfigFile(options.postcssConfigFile);
if (options.postcss)
options.postcss = [...options.postcss, ...plugins];
else
options.postcss = plugins;
console.log(`Using postcss config file.`);
options.postcss = await importPostcssConfigFile(options.postcssConfigFile);
}

@@ -194,0 +191,0 @@ build.onResolve({ filter: styleFilter }, onStyleResolve);

{
"name": "esbuild-style-plugin",
"version": "1.3.1",
"version": "1.4.0",
"description": "Another esbuild plugin for your styling with CSS,SASS,LESS,STYLUS",

@@ -47,2 +47,4 @@ "types": "./dist/index.d.ts",

"postcss-preset-env": "^7.0.1",
"postcss-scss": "^4.0.3",
"postcss-strip-inline-comments": "^0.1.5",
"sass": "^1.43.4",

@@ -49,0 +51,0 @@ "stylus": "^0.55.0",

@@ -46,3 +46,5 @@ # esbuild-style-plugin

- `stylusOptions` <https://stylus-lang.com/docs/js.html>
- `postcss` array of postcss accepted plugins
- `postcss`
- `plugins` array of postcss accepted plugins
- `parser` | `syntax` parse source css - use with postcss-scss
- `postcssConfigFile` absolute path to `postcss.config.js` or `true` for using root folder path

@@ -49,0 +51,0 @@

Sorry, the diff of this file is not supported yet

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