@wyw-in-js/rollup 0.1.1 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # @wyw-in-js/rollup
2
+
3
+ The package contains WyW-in-JS plugin for [Rollup](https://rollupjs.org/).
4
+
5
+ ## Installation
6
+
7
+ ```shell
8
+ # npm
9
+ npm i -D @wyw-in-js/rollup
10
+ # yarn
11
+ yarn add --dev @wyw-in-js/rollup
12
+ # pnpm
13
+ pnpm add -D @wyw-in-js/rollup
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ After installation, add the plugin to your `rollup.config.js`:
19
+
20
+ ```js
21
+ import wyw from '@wyw-in-js/rollup';
22
+
23
+ export default {
24
+ plugins: [
25
+ wyw({
26
+ sourceMap: process.env.NODE_ENV !== 'production',
27
+ }),
28
+ ],
29
+ };
30
+ ```
31
+
32
+ To get details about supported options by the plugin, please check [documentation](https://wyw-in-js.dev/bundlers/rollup).
@@ -100,4 +100,4 @@ export default function wywInJS({
100
100
  }
101
101
  });
102
102
  }
103
- //# sourceMappingURL=index.js.map
103
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["createFilter","logger","slugify","syncResolve","getFileIdx","transform","TransformCacheCollection","wywInJS","exclude","include","preprocessor","sourceMap","rest","filter","cssLookup","cache","emptyConfig","plugin","name","load","id","resolveId","importee","code","log","extend","asyncResolve","what","importer","stack","resolved","resolve","external","resolvedId","split","startsWith","Error","transformServices","options","filename","root","process","cwd","pluginOptions","result","cssText","slug","replace","cssSourceMapText","map","Buffer","from","toString","JSON","stringify","Proxy","get","target","prop","getOwnPropertyDescriptor","Object","ownKeys"],"sources":["../src/index.ts"],"sourcesContent":["/**\n * This file contains a Rollup loader for wyw-in-js.\n * It uses the transform.ts function to generate class names from source code,\n * returns transformed code without template literals and attaches generated source maps\n */\n\nimport { createFilter } from '@rollup/pluginutils';\nimport type { Plugin } from 'rollup';\n\nimport { logger, slugify, syncResolve } from '@wyw-in-js/shared';\nimport type { PluginOptions, Preprocessor, Result } from '@wyw-in-js/transform';\nimport {\n getFileIdx,\n transform,\n TransformCacheCollection,\n} from '@wyw-in-js/transform';\n\ntype RollupPluginOptions = {\n exclude?: string | string[];\n include?: string | string[];\n preprocessor?: Preprocessor;\n sourceMap?: boolean;\n} & Partial<PluginOptions>;\n\nexport default function wywInJS({\n exclude,\n include,\n preprocessor,\n sourceMap,\n ...rest\n}: RollupPluginOptions = {}): Plugin {\n const filter = createFilter(include, exclude);\n const cssLookup: { [key: string]: string } = {};\n const cache = new TransformCacheCollection();\n const emptyConfig = {};\n\n const plugin: Plugin = {\n name: 'wyw-in-js',\n load(id: string) {\n return cssLookup[id];\n },\n /* eslint-disable-next-line consistent-return */\n resolveId(importee: string) {\n if (importee in cssLookup) return importee;\n },\n async transform(\n code: string,\n id: string\n ): Promise<{ code: string; map: Result['sourceMap'] } | undefined> {\n // Do not transform ignored and generated files\n if (!filter(id) || id in cssLookup) return;\n\n const log = logger.extend('rollup').extend(getFileIdx(id));\n\n log('init %s', id);\n\n const asyncResolve = async (\n what: string,\n importer: string,\n stack: string[]\n ) => {\n const resolved = await this.resolve(what, importer);\n if (resolved) {\n if (resolved.external) {\n // If module is marked as external, Rollup will not resolve it,\n // so we need to resolve it ourselves with default resolver\n const resolvedId = syncResolve(what, importer, stack);\n log(\"resolve: ✅ '%s'@'%s -> %O\\n%s\", what, importer, resolved);\n return resolvedId;\n }\n\n log(\"resolve: ✅ '%s'@'%s -> %O\\n%s\", what, importer, resolved);\n\n // Vite adds param like `?v=667939b3` to cached modules\n const resolvedId = resolved.id.split('?')[0];\n\n if (resolvedId.startsWith('\\0')) {\n // \\0 is a special character in Rollup that tells Rollup to not include this in the bundle\n // https://rollupjs.org/guide/en/#outputexports\n return null;\n }\n\n return resolvedId;\n }\n\n log(\"resolve: ❌ '%s'@'%s\", what, importer);\n throw new Error(`Could not resolve ${what}`);\n };\n\n const transformServices = {\n options: {\n filename: id,\n root: process.cwd(),\n preprocessor,\n pluginOptions: rest,\n },\n cache,\n };\n\n const result = await transform(\n transformServices,\n code,\n asyncResolve,\n emptyConfig\n );\n\n if (!result.cssText) return;\n\n let { cssText } = result;\n\n const slug = slugify(cssText);\n const filename = `${id.replace(/\\.[jt]sx?$/, '')}_${slug}.css`;\n\n if (sourceMap && result.cssSourceMapText) {\n const map = Buffer.from(result.cssSourceMapText).toString('base64');\n cssText += `/*# sourceMappingURL=data:application/json;base64,${map}*/`;\n }\n\n cssLookup[filename] = cssText;\n\n result.code += `\\nimport ${JSON.stringify(filename)};\\n`;\n\n /* eslint-disable-next-line consistent-return */\n return { code: result.code, map: result.sourceMap };\n },\n };\n\n return new Proxy<Plugin>(plugin, {\n get(target, prop) {\n return target[prop as keyof Plugin];\n },\n\n getOwnPropertyDescriptor(target, prop) {\n return Object.getOwnPropertyDescriptor(target, prop as keyof Plugin);\n },\n\n ownKeys() {\n // Rollup doesn't ask config about its own keys, so it is Vite.\n\n throw new Error(\n 'You are trying to use @wyw-in-js/rollup with Vite. Please use @wyw-in-js/vite instead.'\n );\n },\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,QAAQ,qBAAqB;AAGlD,SAASC,MAAM,EAAEC,OAAO,EAAEC,WAAW,QAAQ,mBAAmB;AAEhE,SACEC,UAAU,EACVC,SAAS,EACTC,wBAAwB,QACnB,sBAAsB;AAS7B,eAAe,SAASC,OAAOA,CAAC;EAC9BC,OAAO;EACPC,OAAO;EACPC,YAAY;EACZC,SAAS;EACT,GAAGC;AACgB,CAAC,GAAG,CAAC,CAAC,EAAU;EACnC,MAAMC,MAAM,GAAGb,YAAY,CAACS,OAAO,EAAED,OAAO,CAAC;EAC7C,MAAMM,SAAoC,GAAG,CAAC,CAAC;EAC/C,MAAMC,KAAK,GAAG,IAAIT,wBAAwB,CAAC,CAAC;EAC5C,MAAMU,W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AGA,CAACC,MAAM,EAAEC,IAAI,EAAE;MAChB,OAAOD,MAAM,CAACC,IAAI,CAAiB;IACrC,CAAC;IAEDC,wBAAwBA,CAACF,MAAM,EAAEC,IAAI,EAAE;MACrC,OAAOE,MAAM,CAACD,wBAAwB,CAACF,MAAM,EAAEC,IAAoB,CAAC;IACtE,CAAC;IAEDG,OAAOA,CAAA,EAAG;MACR;;MAEA,MAAM,IAAIzB,KAAK,CACb,wFACF,CAAC;IACH;EACF,CAAC,CAAC;AACJ"}
package/package.json CHANGED
@@ -1,25 +1,25 @@
1
1
  {
2
2
  "name": "@wyw-in-js/rollup",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "dependencies": {
5
5
  "@rollup/pluginutils": "^5.0.4",
6
- "@wyw-in-js/shared": "0.1.1",
7
- "@wyw-in-js/transform": "0.1.1"
6
+ "@wyw-in-js/shared": "0.2.1",
7
+ "@wyw-in-js/transform": "0.2.1"
8
8
  },
9
9
  "devDependencies": {
10
10
  "@types/node": "^16.18.55",
11
11
  "rollup": "^3.11.0",
12
12
  "source-map": "^0.7.4",
13
- "@wyw-in-js/babel-config": "0.1.1",
14
- "@wyw-in-js/eslint-config": "0.1.1",
15
- "@wyw-in-js/jest-preset": "0.1.1",
16
- "@wyw-in-js/ts-config": "0.1.1"
13
+ "@wyw-in-js/babel-config": "0.2.1",
14
+ "@wyw-in-js/eslint-config": "0.2.1",
15
+ "@wyw-in-js/jest-preset": "0.2.1",
16
+ "@wyw-in-js/ts-config": "0.2.1"
17
17
  },
18
18
  "engines": {
19
19
  "node": ">=16.0.0"
20
20
  },
21
21
  "exports": {
22
- "import": "./esm/index.js",
22
+ "import": "./esm/index.mjs",
23
23
  "require": "./lib/index.js",
24
24
  "types": "./types/index.d.ts"
25
25
  },
@@ -30,7 +30,7 @@
30
30
  ],
31
31
  "license": "MIT",
32
32
  "main": "lib/index.js",
33
- "module": "esm/index.js",
33
+ "module": "esm/index.mjs",
34
34
  "peerDependencies": {
35
35
  "rollup": "1.20.0||^2.0.0||^3.0.0"
36
36
  },
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "types": "types/index.d.ts",
41
41
  "scripts": {
42
- "build:esm": "babel src --out-dir esm --extensions '.js,.jsx,.ts,.tsx' --source-maps --delete-dir-on-start",
42
+ "build:esm": "babel src --out-dir esm --out-file-extension .mjs --extensions '.js,.jsx,.ts,.tsx' --source-maps --delete-dir-on-start",
43
43
  "build:lib": "cross-env NODE_ENV=legacy babel src --out-dir lib --extensions '.js,.jsx,.ts,.tsx' --source-maps --delete-dir-on-start",
44
44
  "build:types": "tsc --project ./tsconfig.lib.json --baseUrl . --rootDir ./src",
45
45
  "lint": "eslint --ext .js,.ts ."
package/esm/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["createFilter","logger","slugify","syncResolve","getFileIdx","transform","TransformCacheCollection","wywInJS","exclude","include","preprocessor","sourceMap","rest","filter","cssLookup","cache","emptyConfig","plugin","name","load","id","resolveId","importee","code","log","extend","asyncResolve","what","importer","stack","resolved","resolve","external","resolvedId","split","startsWith","Error","transformServices","options","filename","root","process","cwd","pluginOptions","result","cssText","slug","replace","cssSourceMapText","map","Buffer","from","toString","JSON","stringify","Proxy","get","target","prop","getOwnPropertyDescriptor","Object","ownKeys"],"sources":["../src/index.ts"],"sourcesContent":["/**\n * This file contains a Rollup loader for wyw-in-js.\n * It uses the transform.ts function to generate class names from source code,\n * returns transformed code without template literals and attaches generated source maps\n */\n\nimport { createFilter } from '@rollup/pluginutils';\nimport type { Plugin } from 'rollup';\n\nimport { logger, slugify, syncResolve } from '@wyw-in-js/shared';\nimport type { PluginOptions, Preprocessor, Result } from '@wyw-in-js/transform';\nimport {\n getFileIdx,\n transform,\n TransformCacheCollection,\n} from '@wyw-in-js/transform';\n\ntype RollupPluginOptions = {\n exclude?: string | string[];\n include?: string | string[];\n preprocessor?: Preprocessor;\n sourceMap?: boolean;\n} & Partial<PluginOptions>;\n\nexport default function wywInJS({\n exclude,\n include,\n preprocessor,\n sourceMap,\n ...rest\n}: RollupPluginOptions = {}): Plugin {\n const filter = createFilter(include, exclude);\n const cssLookup: { [key: string]: string } = {};\n const cache = new TransformCacheCollection();\n const emptyConfig = {};\n\n const plugin: Plugin = {\n name: 'wyw-in-js',\n load(id: string) {\n return cssLookup[id];\n },\n /* eslint-disable-next-line consistent-return */\n resolveId(importee: string) {\n if (importee in cssLookup) return importee;\n },\n async transform(\n code: string,\n id: string\n ): Promise<{ code: string; map: Result['sourceMap'] } | undefined> {\n // Do not transform ignored and generated files\n if (!filter(id) || id in cssLookup) return;\n\n const log = logger.extend('rollup').extend(getFileIdx(id));\n\n log('init %s', id);\n\n const asyncResolve = async (\n what: string,\n importer: string,\n stack: string[]\n ) => {\n const resolved = await this.resolve(what, importer);\n if (resolved) {\n if (resolved.external) {\n // If module is marked as external, Rollup will not resolve it,\n // so we need to resolve it ourselves with default resolver\n const resolvedId = syncResolve(what, importer, stack);\n log(\"resolve: ✅ '%s'@'%s -> %O\\n%s\", what, importer, resolved);\n return resolvedId;\n }\n\n log(\"resolve: ✅ '%s'@'%s -> %O\\n%s\", what, importer, resolved);\n\n // Vite adds param like `?v=667939b3` to cached modules\n const resolvedId = resolved.id.split('?')[0];\n\n if (resolvedId.startsWith('\\0')) {\n // \\0 is a special character in Rollup that tells Rollup to not include this in the bundle\n // https://rollupjs.org/guide/en/#outputexports\n return null;\n }\n\n return resolvedId;\n }\n\n log(\"resolve: ❌ '%s'@'%s\", what, importer);\n throw new Error(`Could not resolve ${what}`);\n };\n\n const transformServices = {\n options: {\n filename: id,\n root: process.cwd(),\n preprocessor,\n pluginOptions: rest,\n },\n cache,\n };\n\n const result = await transform(\n transformServices,\n code,\n asyncResolve,\n emptyConfig\n );\n\n if (!result.cssText) return;\n\n let { cssText } = result;\n\n const slug = slugify(cssText);\n const filename = `${id.replace(/\\.[jt]sx?$/, '')}_${slug}.css`;\n\n if (sourceMap && result.cssSourceMapText) {\n const map = Buffer.from(result.cssSourceMapText).toString('base64');\n cssText += `/*# sourceMappingURL=data:application/json;base64,${map}*/`;\n }\n\n cssLookup[filename] = cssText;\n\n result.code += `\\nimport ${JSON.stringify(filename)};\\n`;\n\n /* eslint-disable-next-line consistent-return */\n return { code: result.code, map: result.sourceMap };\n },\n };\n\n return new Proxy<Plugin>(plugin, {\n get(target, prop) {\n return target[prop as keyof Plugin];\n },\n\n getOwnPropertyDescriptor(target, prop) {\n return Object.getOwnPropertyDescriptor(target, prop as keyof Plugin);\n },\n\n ownKeys() {\n // Rollup doesn't ask config about its own keys, so it is Vite.\n\n throw new Error(\n 'You are trying to use @wyw-in-js/rollup with Vite. Please use @wyw-in-js/vite instead.'\n );\n },\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,QAAQ,qBAAqB;AAGlD,SAASC,MAAM,EAAEC,OAAO,EAAEC,WAAW,QAAQ,mBAAmB;AAEhE,SACEC,UAAU,EACVC,SAAS,EACTC,wBAAwB,QACnB,sBAAsB;AAS7B,eAAe,SAASC,OAAOA,CAAC;EAC9BC,OAAO;EACPC,OAAO;EACPC,YAAY;EACZC,SAAS;EACT,GAAGC;AACgB,CAAC,GAAG,CAAC,CAAC,EAAU;EACnC,MAAMC,MAAM,GAAGb,YAAY,CAACS,OAAO,EAAED,OAAO,CAAC;EAC7C,MAAMM,SAAoC,GAAG,CAAC,CAAC;EAC/C,MAAMC,KAAK,GAAG,IAAIT,wBAAwB,CAAC,CAAC;EAC5C,MAAMU,WAAW,GAAG,CAAC,CAAC;EAEtB,MAAMC,MAAc,GAAG;IACrBC,IAAI,EAAE,WAAW;IACjBC,IAAIA,CAACC,EAAU,EAAE;MACf,OAAON,SAAS,CAACM,EAAE,CAAC;IACtB,CAAC;IACD;IACAC,SAASA,CAACC,QAAgB,EAAE;MAC1B,IAAIA,QAAQ,IAAIR,SAAS,EAAE,OAAOQ,QAAQ;IAC5C,CAAC;IACD,MAAMjB,SAASA,CACbkB,IAAY,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