esbuild-plugin-sass
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12551