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

esbuild-plugin-sass

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-plugin-sass - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

package.json
{
"name": "esbuild-plugin-sass",
"version": "1.0.0",
"version": "1.0.1",
"description": "Plugin for esbuild to support SASS styles",

@@ -73,3 +73,3 @@ "main": "index.js",

},
"readme": "# esbuild-plugin-sass\n\n![Node.js CI](https://github.com/koluch/esbuild-plugin-sass/workflows/Node.js%20CI/badge.svg)\n\nPlugin for [esbuild](https://esbuild.github.io/) to support Sass style sheets\n\n## Install\n\n```shell\nnpm i esbuild esbuild-plugin-sass\n```\n\nor, using [pnpm](https://pnpm.io/):\n\n```shell\npnpm add esbuild esbuild-plugin-sass\n```\n\n## Usage example\n\nCreate file `src/test.scss`:\n\n```scss\nbody {\n &.isRed {\n background: red;\n }\n}\n```\n\nCreate file `src/index.js`:\n\n```js\nimport \"./test.scss\";\n```\n\nCreate file `build.js`:\n\n```js\nconst esbuild = require(\"esbuild\");\nconst sassPlugin = require(\"esbuild-plugin-sass\");\n\nesbuild\n .build({\n entryPoints: [\"src/index.js\"],\n bundle: true,\n outfile: \"bundle.js\",\n plugins: [sassPlugin()],\n })\n .catch((e) => console.error(e.message));\n```\n\nRun:\n\n```console\n$ node build.js\n```\n\nFile named `bundle.css` with following content will be created:\n\n```css\nbody.isRed {\n background: red;\n}\n```\n\n# API\n\nModule default-exports a function, which need to be called with or without options object:\n\n```typescript\nimport sass = require(\"sass\");\n\ninterface Options {\n rootDir?: string;\n customSassOptions?: Omit<sass.Options, \"file\">;\n}\n\nexport = (options: Options = {}) => Plugin;\n```\n\nSupported options:\n\n- `rootDir` - folder to resolve paths against\n- `customSassOptions` - options object passed to `sass` [render](https://sass-lang.com/documentation/js-api#render) function, except `file` option, which is overriden by plugin for each processed file\n"
"readme": "# esbuild-plugin-sass\n\n![Node.js CI](https://github.com/koluch/esbuild-plugin-sass/workflows/Node.js%20CI/badge.svg)\n\nPlugin for [esbuild](https://esbuild.github.io/) to support Sass style sheets\n\n## Install\n\n```shell\nnpm i esbuild esbuild-plugin-sass\n```\n\nor, using [pnpm](https://pnpm.io/):\n\n```shell\npnpm add esbuild esbuild-plugin-sass\n```\n\n## Usage example\n\nCreate file `src/test.scss`:\n\n```scss\nbody {\n &.isRed {\n background: red;\n }\n}\n```\n\nCreate file `src/index.js`:\n\n```js\nimport \"./test.scss\";\n```\n\nCreate file `build.js`:\n\n```js\nconst esbuild = require(\"esbuild\");\nconst sassPlugin = require(\"esbuild-plugin-sass\");\n\nesbuild\n .build({\n entryPoints: [\"src/index.js\"],\n bundle: true,\n outfile: \"bundle.js\",\n plugins: [sassPlugin()],\n })\n .catch((e) => console.error(e.message));\n```\n\nRun:\n\n```console\n$ node build.js\n```\n\nFile named `bundle.css` with following content will be created:\n\n```css\nbody.isRed {\n background: red;\n}\n```\n\n# API\n\nModule default-exports a function, which need to be called with or without options object:\n\n```typescript\nimport sass = require(\"sass\");\n\ninterface Options {\n rootDir?: string;\n customSassOptions?: Omit<sass.Options, \"file\">;\n}\n\nexport = (options: Options = {}) => Plugin;\n```\n\nSupported options:\n\n- `rootDir` - folder to resolve paths against\n- `customSassOptions` - options object passed to `sass` [compile](https://sass-lang.com/documentation/js-api/modules#compile) function, except `file` option, which is overriden by plugin for each processed file\n"
}

@@ -85,2 +85,2 @@ # esbuild-plugin-sass

- `rootDir` - folder to resolve paths against
- `customSassOptions` - options object passed to `sass` [render](https://sass-lang.com/documentation/js-api#render) function, except `file` option, which is overriden by plugin for each processed file
- `customSassOptions` - options object passed to `sass` [compile](https://sass-lang.com/documentation/js-api/modules#compile) function, except `file` option, which is overriden by plugin for each processed file
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