@pikacss/nuxt-pikacss 0.0.29 → 0.0.31
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/dist/index.cjs +61 -47
- package/dist/index.d.cts +12 -14
- package/dist/index.d.mts +12 -12
- package/dist/index.mjs +31 -32
- package/package.json +4 -5
- package/dist/index.d.ts +0 -19
package/dist/index.cjs
CHANGED
|
@@ -1,52 +1,66 @@
|
|
|
1
|
-
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
2
26
|
|
|
3
|
-
|
|
27
|
+
//#endregion
|
|
28
|
+
let __nuxt_kit = require("@nuxt/kit");
|
|
29
|
+
let __pikacss_vite_plugin_pikacss = require("@pikacss/vite-plugin-pikacss");
|
|
30
|
+
__pikacss_vite_plugin_pikacss = __toESM(__pikacss_vite_plugin_pikacss);
|
|
4
31
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
kit.addVitePlugin(vitePlugin);
|
|
31
|
-
nuxt.hook("prepare:types", async (options) => {
|
|
32
|
-
const ctx = await vitePlugin.getCtx();
|
|
33
|
-
const tsCodegenFilepath = ctx.tsCodegenFilepath;
|
|
34
|
-
if (tsCodegenFilepath == null)
|
|
35
|
-
return;
|
|
36
|
-
options.tsConfig.include ||= [];
|
|
37
|
-
options.tsConfig.include.push(tsCodegenFilepath);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
32
|
+
//#region src/index.ts
|
|
33
|
+
var src_default = (0, __nuxt_kit.defineNuxtModule)({
|
|
34
|
+
meta: {
|
|
35
|
+
name: "pikacss",
|
|
36
|
+
configKey: "pikacss"
|
|
37
|
+
},
|
|
38
|
+
async setup(_, nuxt) {
|
|
39
|
+
(0, __nuxt_kit.addPluginTemplate)({
|
|
40
|
+
filename: "pikacss.mjs",
|
|
41
|
+
getContents() {
|
|
42
|
+
return "import { defineNuxtPlugin } from '#imports';\nexport default defineNuxtPlugin(() => {});\nimport \"virtual:pika.css\"; ";
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
const vitePlugin = (0, __pikacss_vite_plugin_pikacss.default)({
|
|
46
|
+
currentPackageName: "@pikacss/nuxt-pikacss",
|
|
47
|
+
...nuxt.options.pikacss || {}
|
|
48
|
+
});
|
|
49
|
+
(0, __nuxt_kit.addVitePlugin)(vitePlugin);
|
|
50
|
+
nuxt.hook("prepare:types", async (options) => {
|
|
51
|
+
const tsCodegenFilepath = (await vitePlugin.getCtx()).tsCodegenFilepath;
|
|
52
|
+
if (tsCodegenFilepath == null) return;
|
|
53
|
+
options.tsConfig.include ||= [];
|
|
54
|
+
options.tsConfig.include.push(tsCodegenFilepath);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
40
57
|
});
|
|
41
58
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
Object.keys(VitePikaCSSPlugin).forEach(function (k) {
|
|
51
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = VitePikaCSSPlugin[k];
|
|
59
|
+
//#endregion
|
|
60
|
+
module.exports = src_default;
|
|
61
|
+
Object.keys(__pikacss_vite_plugin_pikacss).forEach(function (k) {
|
|
62
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function () { return __pikacss_vite_plugin_pikacss[k]; }
|
|
65
|
+
});
|
|
52
66
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import { NuxtModule } from
|
|
2
|
-
import { PluginOptions } from
|
|
3
|
-
export * from
|
|
1
|
+
import { NuxtModule } from "@nuxt/schema";
|
|
2
|
+
import { PluginOptions } from "@pikacss/vite-plugin-pikacss";
|
|
3
|
+
export * from "@pikacss/vite-plugin-pikacss";
|
|
4
4
|
|
|
5
|
+
//#region src/index.d.ts
|
|
5
6
|
type ModuleOptions = Omit<PluginOptions, 'currentPackageName'>;
|
|
6
7
|
declare const _default: NuxtModule<ModuleOptions>;
|
|
7
|
-
|
|
8
8
|
declare module '@nuxt/schema' {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
interface NuxtConfig {
|
|
10
|
+
pikacss?: ModuleOptions;
|
|
11
|
+
}
|
|
12
|
+
interface NuxtOptions {
|
|
13
|
+
pikacss?: ModuleOptions;
|
|
14
|
+
}
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export = _default;
|
|
19
|
-
export type { ModuleOptions };
|
|
16
|
+
//#endregion
|
|
17
|
+
export { ModuleOptions, _default as default };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export * from
|
|
1
|
+
import { PluginOptions } from "@pikacss/vite-plugin-pikacss";
|
|
2
|
+
import { NuxtModule } from "@nuxt/schema";
|
|
3
|
+
export * from "@pikacss/vite-plugin-pikacss";
|
|
4
4
|
|
|
5
|
+
//#region src/index.d.ts
|
|
5
6
|
type ModuleOptions = Omit<PluginOptions, 'currentPackageName'>;
|
|
6
7
|
declare const _default: NuxtModule<ModuleOptions>;
|
|
7
|
-
|
|
8
8
|
declare module '@nuxt/schema' {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
interface NuxtConfig {
|
|
10
|
+
pikacss?: ModuleOptions;
|
|
11
|
+
}
|
|
12
|
+
interface NuxtOptions {
|
|
13
|
+
pikacss?: ModuleOptions;
|
|
14
|
+
}
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
export {
|
|
16
|
+
//#endregion
|
|
17
|
+
export { ModuleOptions, _default as default };
|
package/dist/index.mjs
CHANGED
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
export * from '@pikacss/vite-plugin-pikacss';
|
|
1
|
+
import { addPluginTemplate, addVitePlugin, defineNuxtModule } from "@nuxt/kit";
|
|
2
|
+
import VitePikaCSSPlugin from "@pikacss/vite-plugin-pikacss";
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
4
|
+
export * from "@pikacss/vite-plugin-pikacss"
|
|
5
|
+
|
|
6
|
+
//#region src/index.ts
|
|
7
|
+
var src_default = defineNuxtModule({
|
|
8
|
+
meta: {
|
|
9
|
+
name: "pikacss",
|
|
10
|
+
configKey: "pikacss"
|
|
11
|
+
},
|
|
12
|
+
async setup(_, nuxt) {
|
|
13
|
+
addPluginTemplate({
|
|
14
|
+
filename: "pikacss.mjs",
|
|
15
|
+
getContents() {
|
|
16
|
+
return "import { defineNuxtPlugin } from '#imports';\nexport default defineNuxtPlugin(() => {});\nimport \"virtual:pika.css\"; ";
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const vitePlugin = VitePikaCSSPlugin({
|
|
20
|
+
currentPackageName: "@pikacss/nuxt-pikacss",
|
|
21
|
+
...nuxt.options.pikacss || {}
|
|
22
|
+
});
|
|
23
|
+
addVitePlugin(vitePlugin);
|
|
24
|
+
nuxt.hook("prepare:types", async (options) => {
|
|
25
|
+
const tsCodegenFilepath = (await vitePlugin.getCtx()).tsCodegenFilepath;
|
|
26
|
+
if (tsCodegenFilepath == null) return;
|
|
27
|
+
options.tsConfig.include ||= [];
|
|
28
|
+
options.tsConfig.include.push(tsCodegenFilepath);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
33
31
|
});
|
|
34
32
|
|
|
35
|
-
|
|
33
|
+
//#endregion
|
|
34
|
+
export { src_default as default };
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.0.
|
|
7
|
+
"version": "0.0.31",
|
|
8
8
|
"author": "DevilTea <ch19980814@gmail.com>",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
@@ -29,21 +29,20 @@
|
|
|
29
29
|
},
|
|
30
30
|
"main": "dist/index.cjs",
|
|
31
31
|
"module": "dist/index.mjs",
|
|
32
|
-
"types": "dist/index.d.
|
|
32
|
+
"types": "dist/index.d.mts",
|
|
33
33
|
"files": [
|
|
34
34
|
"dist"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@nuxt/kit": "^3.13.2",
|
|
38
38
|
"pathe": "^2.0.3",
|
|
39
|
-
"@pikacss/vite-plugin-pikacss": "0.0.
|
|
39
|
+
"@pikacss/vite-plugin-pikacss": "0.0.31"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@nuxt/schema": "^3.13.2"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
|
-
"build": "
|
|
46
|
-
"stub": "unbuild --stub",
|
|
45
|
+
"build": "tsdown",
|
|
47
46
|
"typecheck": "pnpm typecheck:package && pnpm typecheck:test",
|
|
48
47
|
"typecheck:package": "tsc --project ./tsconfig.package.json --noEmit",
|
|
49
48
|
"typecheck:test": "tsc --project ./tsconfig.tests.json --noEmit",
|
package/dist/index.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { NuxtModule } from '@nuxt/schema';
|
|
2
|
-
import { PluginOptions } from '@pikacss/vite-plugin-pikacss';
|
|
3
|
-
export * from '@pikacss/vite-plugin-pikacss';
|
|
4
|
-
|
|
5
|
-
type ModuleOptions = Omit<PluginOptions, 'currentPackageName'>;
|
|
6
|
-
declare const _default: NuxtModule<ModuleOptions>;
|
|
7
|
-
|
|
8
|
-
declare module '@nuxt/schema' {
|
|
9
|
-
interface NuxtConfig {
|
|
10
|
-
pikacss?: ModuleOptions;
|
|
11
|
-
}
|
|
12
|
-
interface NuxtOptions {
|
|
13
|
-
pikacss?: ModuleOptions;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// @ts-ignore
|
|
18
|
-
export = _default;
|
|
19
|
-
export type { ModuleOptions };
|