@pikacss/nuxt-pikacss 0.0.3 → 0.0.5
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 +8 -15
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +9 -16
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const kit = require('@nuxt/kit');
|
|
6
6
|
const VitePikaCSSPlugin = require('@pikacss/vite-plugin-pikacss');
|
|
7
|
-
const pathe = require('pathe');
|
|
8
7
|
|
|
9
8
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
10
9
|
|
|
@@ -24,24 +23,18 @@ export default defineNuxtPlugin(() => {});
|
|
|
24
23
|
import "virtual:pika.css"; `;
|
|
25
24
|
}
|
|
26
25
|
});
|
|
27
|
-
const
|
|
28
|
-
const devCssPath = pathe.join(nuxt.options.buildDir, "pika/pika.dev.css");
|
|
29
|
-
kit.addVitePlugin(VitePikaCSSPlugin__default({
|
|
30
|
-
tsCodegen: tsCodegenPath,
|
|
31
|
-
devCss: devCssPath,
|
|
26
|
+
const vitePlugin = VitePikaCSSPlugin__default({
|
|
32
27
|
currentPackageName: "@pikacss/nuxt-pikacss",
|
|
33
28
|
...nuxt.options.pikacss || {}
|
|
34
|
-
}));
|
|
35
|
-
kit.extendViteConfig((config) => {
|
|
36
|
-
config.server ??= {};
|
|
37
|
-
config.server.watch ??= {};
|
|
38
|
-
config.server.watch.ignored ??= [];
|
|
39
|
-
config.server.watch.ignored = [config.server.watch.ignored].flat();
|
|
40
|
-
config.server.watch.ignored.push(`!${devCssPath}`);
|
|
41
29
|
});
|
|
42
|
-
|
|
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;
|
|
43
36
|
options.tsConfig.include ||= [];
|
|
44
|
-
options.tsConfig.include.push(
|
|
37
|
+
options.tsConfig.include.push(tsCodegenFilepath);
|
|
45
38
|
});
|
|
46
39
|
}
|
|
47
40
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import { NuxtModule } from '@nuxt/schema';
|
|
|
2
2
|
import { PluginOptions } from '@pikacss/vite-plugin-pikacss';
|
|
3
3
|
export * from '@pikacss/vite-plugin-pikacss';
|
|
4
4
|
|
|
5
|
-
type ModuleOptions = Omit<PluginOptions, '
|
|
5
|
+
type ModuleOptions = Omit<PluginOptions, 'currentPackageName'>;
|
|
6
6
|
declare const _default: NuxtModule<ModuleOptions>;
|
|
7
7
|
|
|
8
8
|
declare module '@nuxt/schema' {
|
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { NuxtModule } from '@nuxt/schema';
|
|
|
2
2
|
import { PluginOptions } from '@pikacss/vite-plugin-pikacss';
|
|
3
3
|
export * from '@pikacss/vite-plugin-pikacss';
|
|
4
4
|
|
|
5
|
-
type ModuleOptions = Omit<PluginOptions, '
|
|
5
|
+
type ModuleOptions = Omit<PluginOptions, 'currentPackageName'>;
|
|
6
6
|
declare const _default: NuxtModule<ModuleOptions>;
|
|
7
7
|
|
|
8
8
|
declare module '@nuxt/schema' {
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { NuxtModule } from '@nuxt/schema';
|
|
|
2
2
|
import { PluginOptions } from '@pikacss/vite-plugin-pikacss';
|
|
3
3
|
export * from '@pikacss/vite-plugin-pikacss';
|
|
4
4
|
|
|
5
|
-
type ModuleOptions = Omit<PluginOptions, '
|
|
5
|
+
type ModuleOptions = Omit<PluginOptions, 'currentPackageName'>;
|
|
6
6
|
declare const _default: NuxtModule<ModuleOptions>;
|
|
7
7
|
|
|
8
8
|
declare module '@nuxt/schema' {
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { defineNuxtModule, addPluginTemplate, addVitePlugin
|
|
1
|
+
import { defineNuxtModule, addPluginTemplate, addVitePlugin } from '@nuxt/kit';
|
|
2
2
|
import VitePikaCSSPlugin__default from '@pikacss/vite-plugin-pikacss';
|
|
3
3
|
export * from '@pikacss/vite-plugin-pikacss';
|
|
4
|
-
import { join } from 'pathe';
|
|
5
4
|
|
|
6
5
|
const index = defineNuxtModule({
|
|
7
6
|
meta: {
|
|
@@ -17,24 +16,18 @@ export default defineNuxtPlugin(() => {});
|
|
|
17
16
|
import "virtual:pika.css"; `;
|
|
18
17
|
}
|
|
19
18
|
});
|
|
20
|
-
const
|
|
21
|
-
const devCssPath = join(nuxt.options.buildDir, "pika/pika.dev.css");
|
|
22
|
-
addVitePlugin(VitePikaCSSPlugin__default({
|
|
23
|
-
tsCodegen: tsCodegenPath,
|
|
24
|
-
devCss: devCssPath,
|
|
19
|
+
const vitePlugin = VitePikaCSSPlugin__default({
|
|
25
20
|
currentPackageName: "@pikacss/nuxt-pikacss",
|
|
26
21
|
...nuxt.options.pikacss || {}
|
|
27
|
-
}));
|
|
28
|
-
extendViteConfig((config) => {
|
|
29
|
-
config.server ??= {};
|
|
30
|
-
config.server.watch ??= {};
|
|
31
|
-
config.server.watch.ignored ??= [];
|
|
32
|
-
config.server.watch.ignored = [config.server.watch.ignored].flat();
|
|
33
|
-
config.server.watch.ignored.push(`!${devCssPath}`);
|
|
34
22
|
});
|
|
35
|
-
|
|
23
|
+
addVitePlugin(vitePlugin);
|
|
24
|
+
nuxt.hook("prepare:types", async (options) => {
|
|
25
|
+
const ctx = await vitePlugin.getCtx();
|
|
26
|
+
const tsCodegenFilepath = ctx.tsCodegenFilepath;
|
|
27
|
+
if (tsCodegenFilepath == null)
|
|
28
|
+
return;
|
|
36
29
|
options.tsConfig.include ||= [];
|
|
37
|
-
options.tsConfig.include.push(
|
|
30
|
+
options.tsConfig.include.push(tsCodegenFilepath);
|
|
38
31
|
});
|
|
39
32
|
}
|
|
40
33
|
});
|
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.5",
|
|
8
8
|
"author": "DevilTea <ch19980814@gmail.com>",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@nuxt/kit": "^3.0.0",
|
|
38
38
|
"pathe": "^2.0.3",
|
|
39
|
-
"@pikacss/vite-plugin-pikacss": "0.0.
|
|
39
|
+
"@pikacss/vite-plugin-pikacss": "0.0.5"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@nuxt/schema": "^3.0.0"
|