@pikacss/unplugin-pikacss 0.0.57 → 0.0.58

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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Universal bundler plugin for PikaCSS. Supports Vite, Webpack, Rspack, Rollup, Rolldown, and esbuild.
4
4
 
5
- The Vite entry supports Vite 7 and 8 only.
5
+ PikaCSS requires Node.js 22 or later (package engine range: `>=22`). The Vite entry supports Vite 7 and 8 only.
6
6
 
7
7
  ## Installation
8
8
 
@@ -28,12 +28,29 @@ export default defineConfig({
28
28
 
29
29
  ### Other bundlers
30
30
 
31
+ Use the entry point matching your bundler:
32
+
33
+ | Bundler | Entry point |
34
+ |---|---|
35
+ | Rollup | `@pikacss/unplugin-pikacss/rollup` |
36
+ | Rolldown | `@pikacss/unplugin-pikacss/rolldown` |
37
+ | Webpack | `@pikacss/unplugin-pikacss/webpack` |
38
+ | Rspack | `@pikacss/unplugin-pikacss/rspack` |
39
+ | esbuild | `@pikacss/unplugin-pikacss/esbuild` |
40
+
41
+ For example:
42
+
31
43
  ```ts
44
+ // rollup.config.ts
32
45
  import pikacss from '@pikacss/unplugin-pikacss/rollup'
33
- import pikacss from '@pikacss/unplugin-pikacss/rspack'
34
- import pikacss from '@pikacss/unplugin-pikacss/webpack'
46
+
47
+ export default {
48
+ plugins: [pikacss()],
49
+ }
35
50
  ```
36
51
 
52
+ See the integration guide for bundler-specific configuration details.
53
+
37
54
  ## Documentation
38
55
 
39
56
  See the [full documentation](https://pikacss.github.io/integrations/unplugin).
@@ -1,4 +1,4 @@
1
- import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-ekE7tO8H.mjs";
1
+ import { n as ResolvedPluginOptions, r as ScanOptions, t as PluginOptions } from "./types-lr98kclY.mjs";
2
2
  import * as _$unplugin from "unplugin";
3
3
  export * from "@pikacss/integration";
4
4
 
@@ -21,4 +21,4 @@ export * from "@pikacss/integration";
21
21
  */
22
22
  declare const _default: (options?: PluginOptions | undefined) => _$unplugin.EsbuildPlugin;
23
23
  //#endregion
24
- export { PluginOptions, ResolvedPluginOptions, _default as default };
24
+ export { PluginOptions, ResolvedPluginOptions, ScanOptions, _default as default };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-ekE7tO8H.mjs";
1
+ import { n as ResolvedPluginOptions, r as ScanOptions, t as PluginOptions } from "./types-lr98kclY.mjs";
2
2
  import * as _$unplugin from "unplugin";
3
3
  import { UnpluginFactory } from "unplugin";
4
4
  export * from "@pikacss/integration";
@@ -9,7 +9,7 @@ export * from "@pikacss/integration";
9
9
  *
10
10
  * @param options - User-supplied plugin configuration. When `undefined`, all defaults apply.
11
11
  * @param meta - Unplugin metadata providing the target bundler framework name.
12
- * @returns An unplugin hooks object consumed by Vite, webpack, Rollup, esbuild, and Rspack.
12
+ * @returns An unplugin hooks object consumed by the exported bundler adapters.
13
13
  *
14
14
  * @remarks
15
15
  * This is the core entry-point called by `createUnplugin`. It resolves user options,
@@ -47,4 +47,4 @@ declare const unpluginFactory: UnpluginFactory<PluginOptions | undefined>;
47
47
  */
48
48
  declare const unpluginPika: _$unplugin.UnpluginInstance<PluginOptions | undefined, boolean>;
49
49
  //#endregion
50
- export { PluginOptions, ResolvedPluginOptions, unpluginPika as default, unpluginPika, unpluginFactory };
50
+ export { PluginOptions, ResolvedPluginOptions, ScanOptions, unpluginPika as default, unpluginPika, unpluginFactory };
package/dist/index.mjs CHANGED
@@ -13,7 +13,7 @@ const PLUGIN_NAME = "unplugin-pikacss";
13
13
  *
14
14
  * @param options - User-supplied plugin configuration. When `undefined`, all defaults apply.
15
15
  * @param meta - Unplugin metadata providing the target bundler framework name.
16
- * @returns An unplugin hooks object consumed by Vite, webpack, Rollup, esbuild, and Rspack.
16
+ * @returns An unplugin hooks object consumed by the exported bundler adapters.
17
17
  *
18
18
  * @remarks
19
19
  * This is the core entry-point called by `createUnplugin`. It resolves user options,
@@ -1,4 +1,4 @@
1
- import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-ekE7tO8H.mjs";
1
+ import { n as ResolvedPluginOptions, r as ScanOptions, t as PluginOptions } from "./types-lr98kclY.mjs";
2
2
  export * from "@pikacss/integration";
3
3
 
4
4
  //#region ../../node_modules/.pnpm/rolldown@1.0.0-rc.12_@emnapi+core@1.11.1_@emnapi+runtime@1.11.1/node_modules/rolldown/dist/shared/logging-C6h4g8dA.d.mts
@@ -5745,4 +5745,4 @@ interface InputOptions {
5745
5745
  */
5746
5746
  declare const _default: (options?: PluginOptions | undefined) => Plugin<any> | Plugin<any>[];
5747
5747
  //#endregion
5748
- export { PluginOptions, ResolvedPluginOptions, _default as default };
5748
+ export { PluginOptions, ResolvedPluginOptions, ScanOptions, _default as default };
package/dist/rollup.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-ekE7tO8H.mjs";
1
+ import { n as ResolvedPluginOptions, r as ScanOptions, t as PluginOptions } from "./types-lr98kclY.mjs";
2
2
  import * as _$unplugin from "unplugin";
3
3
  export * from "@pikacss/integration";
4
4
 
@@ -21,4 +21,4 @@ export * from "@pikacss/integration";
21
21
  */
22
22
  declare const _default: (options?: PluginOptions | undefined) => _$unplugin.RollupPlugin<any> | _$unplugin.RollupPlugin<any>[];
23
23
  //#endregion
24
- export { PluginOptions, ResolvedPluginOptions, _default as default };
24
+ export { PluginOptions, ResolvedPluginOptions, ScanOptions, _default as default };
package/dist/rspack.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-ekE7tO8H.mjs";
1
+ import { n as ResolvedPluginOptions, r as ScanOptions, t as PluginOptions } from "./types-lr98kclY.mjs";
2
2
  export * from "@pikacss/integration";
3
3
 
4
4
  //#region src/rspack.d.ts
@@ -20,4 +20,4 @@ export * from "@pikacss/integration";
20
20
  */
21
21
  declare const _default: (options?: PluginOptions | undefined) => RspackPluginInstance;
22
22
  //#endregion
23
- export { PluginOptions, ResolvedPluginOptions, _default as default };
23
+ export { PluginOptions, ResolvedPluginOptions, ScanOptions, _default as default };
@@ -1,6 +1,31 @@
1
1
  import { EngineConfig, IntegrationContextOptions, Nullish } from "@pikacss/integration";
2
2
 
3
3
  //#region src/types.d.ts
4
+ /**
5
+ * Glob patterns controlling which source files are scanned for `pika()` calls.
6
+ *
7
+ * @remarks
8
+ * Explicit `include` or `exclude` values replace the corresponding defaults verbatim;
9
+ * they are not merged with the default patterns.
10
+ */
11
+ interface ScanOptions {
12
+ /**
13
+ * File glob patterns to scan. Supports a single string or array of strings.
14
+ * When omitted, the default covers every extension the AST compiler
15
+ * supports: the full JS family plus Vue SFCs.
16
+ *
17
+ * @default ['**\/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,vue}']
18
+ */
19
+ include?: string | string[];
20
+ /**
21
+ * File glob patterns to exclude. Supports a single string or array of strings.
22
+ * The default skips dependencies, build outputs, coverage, VCS metadata, and
23
+ * framework build dirs (`.nuxt`/`.output`).
24
+ *
25
+ * @default ['node_modules/**', 'dist/**', '.git/**', '.nuxt/**', '.output/**', 'coverage/**']
26
+ */
27
+ exclude?: string | string[];
28
+ }
4
29
  /**
5
30
  * User-facing configuration options for the PikaCSS bundler plugin.
6
31
  *
@@ -39,22 +64,7 @@ interface PluginOptions {
39
64
  *
40
65
  * @default `{ include: ['**\/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,vue}'], exclude: ['node_modules/**', 'dist/**', '.git/**', '.nuxt/**', '.output/**', 'coverage/**'] }`
41
66
  */
42
- scan?: {
43
- /**
44
- * File glob patterns to scan. Supports a single string or array of strings.
45
- * When omitted, the default covers every extension the AST compiler
46
- * supports: the full JS family plus Vue SFCs. An explicit value wins verbatim.
47
- * @default ['**\/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,vue}']
48
- */
49
- include?: string | string[];
50
- /**
51
- * File glob patterns to exclude. Supports a single string or array of strings.
52
- * The default skips dependencies, build outputs, coverage, VCS metadata, and
53
- * framework build dirs (`.nuxt`/`.output`). An explicit value wins verbatim.
54
- * @default ['node_modules/**', 'dist/**', '.git/**', '.nuxt/**', '.output/**', 'coverage/**']
55
- */
56
- exclude?: string | string[];
57
- };
67
+ scan?: ScanOptions;
58
68
  /**
59
69
  * Engine configuration object or a path to a `pika.config.*` file. When omitted, the plugin
60
70
  * auto-discovers a config file in the project root.
@@ -136,4 +146,4 @@ interface ResolvedPluginOptions {
136
146
  autoCreateConfig: boolean;
137
147
  }
138
148
  //#endregion
139
- export { ResolvedPluginOptions as n, PluginOptions as t };
149
+ export { ResolvedPluginOptions as n, ScanOptions as r, PluginOptions as t };
package/dist/vite.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-ekE7tO8H.mjs";
1
+ import { n as ResolvedPluginOptions, r as ScanOptions, t as PluginOptions } from "./types-lr98kclY.mjs";
2
2
  import { Plugin } from "vite";
3
3
  export * from "@pikacss/integration";
4
4
 
@@ -23,4 +23,4 @@ export * from "@pikacss/integration";
23
23
  */
24
24
  declare const _default: (options?: PluginOptions) => Plugin;
25
25
  //#endregion
26
- export { PluginOptions, ResolvedPluginOptions, _default as default };
26
+ export { PluginOptions, ResolvedPluginOptions, ScanOptions, _default as default };
@@ -1,4 +1,4 @@
1
- import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-ekE7tO8H.mjs";
1
+ import { n as ResolvedPluginOptions, r as ScanOptions, t as PluginOptions } from "./types-lr98kclY.mjs";
2
2
  export * from "@pikacss/integration";
3
3
 
4
4
  //#region src/webpack.d.ts
@@ -20,4 +20,4 @@ export * from "@pikacss/integration";
20
20
  */
21
21
  declare const _default: (options?: PluginOptions | undefined) => WebpackPluginInstance;
22
22
  //#endregion
23
- export { PluginOptions, ResolvedPluginOptions, _default as default };
23
+ export { PluginOptions, ResolvedPluginOptions, ScanOptions, _default as default };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pikacss/unplugin-pikacss",
3
3
  "type": "module",
4
- "version": "0.0.57",
4
+ "version": "0.0.58",
5
5
  "author": "DevilTea <ch19980814@gmail.com>",
6
6
  "license": "MIT",
7
7
  "homepage": "https://pikacss.github.io",
@@ -94,7 +94,7 @@
94
94
  "pathe": "^2.0.3",
95
95
  "perfect-debounce": "^2.1.0",
96
96
  "unplugin": "^3.3.0",
97
- "@pikacss/integration": "0.0.57"
97
+ "@pikacss/integration": "0.0.58"
98
98
  },
99
99
  "devDependencies": {
100
100
  "esbuild": "^0.28.1",