vite-pug-static-builder 1.0.2-beta.0 → 1.0.2
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/build.d.ts +2 -3
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +9 -4
- package/dist/index.d.ts +6 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -13
- package/dist/pug.d.ts.map +1 -1
- package/dist/pug.js +19 -23
- package/dist/serve.d.ts +2 -3
- package/dist/serve.d.ts.map +1 -1
- package/dist/serve.js +2 -2
- package/package.json +70 -70
package/dist/build.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { Plugin } from 'vite';
|
|
|
3
3
|
/**
|
|
4
4
|
* Pugビルド設定
|
|
5
5
|
*/
|
|
6
|
-
interface BuildSettings {
|
|
6
|
+
export interface BuildSettings {
|
|
7
7
|
/** Pugコンパイルオプション */
|
|
8
8
|
readonly options?: Pug.Options;
|
|
9
9
|
/** Pugローカル変数オブジェクト */
|
|
@@ -14,6 +14,5 @@ interface BuildSettings {
|
|
|
14
14
|
* @param settings - ビルド設定
|
|
15
15
|
* @returns Viteプラグイン
|
|
16
16
|
*/
|
|
17
|
-
export declare const vitePluginPugBuild: (settings
|
|
18
|
-
export {};
|
|
17
|
+
export declare const vitePluginPugBuild: (settings?: BuildSettings) => Plugin;
|
|
19
18
|
//# sourceMappingURL=build.d.ts.map
|
package/dist/build.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAA;AAE1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAIlC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAA;AAE1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAIlC;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,oBAAoB;IACpB,QAAQ,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IAC9B,sBAAsB;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,YAAY,CAAA;CACnC;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,WAAW,aAAa,KAAG,MAmE7D,CAAA"}
|
package/dist/build.js
CHANGED
|
@@ -8,12 +8,16 @@ import { outputLog } from './utils.js';
|
|
|
8
8
|
* @returns Viteプラグイン
|
|
9
9
|
*/
|
|
10
10
|
export const vitePluginPugBuild = (settings) => {
|
|
11
|
-
const { options, locals } = settings;
|
|
11
|
+
const { options, locals } = settings ?? {};
|
|
12
12
|
const pathMap = new Map();
|
|
13
|
+
let root = '';
|
|
13
14
|
return {
|
|
14
15
|
name: 'vite-plugin-pug-build',
|
|
15
16
|
enforce: 'pre',
|
|
16
17
|
apply: 'build',
|
|
18
|
+
configResolved(config) {
|
|
19
|
+
root = config.root;
|
|
20
|
+
},
|
|
17
21
|
resolveId(source) {
|
|
18
22
|
const parsedPath = path.parse(source);
|
|
19
23
|
if (parsedPath.ext !== '.pug') {
|
|
@@ -35,9 +39,10 @@ export const vitePluginPugBuild = (settings) => {
|
|
|
35
39
|
// PugファイルのHTMLへの変換
|
|
36
40
|
if (pathMap.has(id)) {
|
|
37
41
|
const pugPath = pathMap.get(id);
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
|
|
42
|
+
const pugOptions = { ...options, ...locals };
|
|
43
|
+
const compiledTemplate = compileFile(pugPath, pugOptions);
|
|
44
|
+
const html = compiledTemplate();
|
|
45
|
+
outputLog('info', 'compiled:', path.relative(root, pugPath));
|
|
41
46
|
return html;
|
|
42
47
|
}
|
|
43
48
|
// 既存のHTMLファイルの読み込み
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type
|
|
1
|
+
import { type BuildSettings } from './build.js';
|
|
2
|
+
import { type ServeSettings } from './serve.js';
|
|
3
3
|
/**
|
|
4
4
|
* プラグイン設定
|
|
5
5
|
*/
|
|
6
6
|
interface Settings {
|
|
7
|
-
/**
|
|
8
|
-
readonly
|
|
9
|
-
/**
|
|
10
|
-
readonly
|
|
11
|
-
/** 開発サーバー時のPugコンパイルオプション */
|
|
12
|
-
readonly serveOptions?: Pug.Options;
|
|
13
|
-
/** 開発サーバー時のPugローカル変数 */
|
|
14
|
-
readonly serveLocals?: Pug.LocalsObject;
|
|
15
|
-
/** 無視パターン */
|
|
16
|
-
readonly ignorePattern?: Picomatch.Glob;
|
|
17
|
-
/** リロード設定 */
|
|
18
|
-
readonly reload?: boolean;
|
|
7
|
+
/** ビルド時の設定 */
|
|
8
|
+
readonly build?: BuildSettings;
|
|
9
|
+
/** 開発サーバー時の設定 */
|
|
10
|
+
readonly serve?: ServeSettings;
|
|
19
11
|
}
|
|
20
12
|
/**
|
|
21
13
|
* Vite Pug静的サイトプラグイン
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AACnE,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AAEnE;;GAEG;AACH,UAAU,QAAQ;IAChB,cAAc;IACd,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAA;IAC9B,iBAAiB;IACjB,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAA;CAC/B;AAID;;;;GAIG;AACH,QAAA,MAAM,mBAAmB,GAAI,eAAe,QAAQ,iCAOnD,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -11,18 +11,6 @@ const vitePluginPugStatic = (userSettings) => {
|
|
|
11
11
|
...defaultSettings,
|
|
12
12
|
...userSettings,
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
return [
|
|
16
|
-
vitePluginPugBuild({
|
|
17
|
-
...(buildOptions && { options: buildOptions }),
|
|
18
|
-
...(buildLocals && { locals: buildLocals }),
|
|
19
|
-
}),
|
|
20
|
-
vitePluginPugServe({
|
|
21
|
-
...(serveOptions && { options: serveOptions }),
|
|
22
|
-
...(serveLocals && { locals: serveLocals }),
|
|
23
|
-
...(ignorePattern && { ignorePattern }),
|
|
24
|
-
...(reload !== undefined && { reload }),
|
|
25
|
-
}),
|
|
26
|
-
];
|
|
14
|
+
return [vitePluginPugBuild(settings.build), vitePluginPugServe(settings.serve)];
|
|
27
15
|
};
|
|
28
16
|
export default vitePluginPugStatic;
|
package/dist/pug.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pug.d.ts","sourceRoot":"","sources":["../src/pug.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAA;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,MAAM,CAAA;AA+CnD;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,GACrB,aAAa,WAAW,EACxB,KAAK,MAAM,EACX,SAAS,MAAM,EACf,UAAU,GAAG,CAAC,OAAO,EACrB,SAAS,GAAG,CAAC,YAAY,KACxB,OAAO,CAAC,OAAO,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"pug.d.ts","sourceRoot":"","sources":["../src/pug.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAA;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,MAAM,CAAA;AA+CnD;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,GACrB,aAAa,WAAW,EACxB,KAAK,MAAM,EACX,SAAS,MAAM,EACf,UAAU,GAAG,CAAC,OAAO,EACrB,SAAS,GAAG,CAAC,YAAY,KACxB,OAAO,CAAC,OAAO,GAAG,KAAK,CAiDzB,CAAA"}
|
package/dist/pug.js
CHANGED
|
@@ -2,33 +2,33 @@ import path from 'node:path';
|
|
|
2
2
|
import { compileFile } from 'pug';
|
|
3
3
|
import { outputLog } from './utils.js';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* 依存関係をモジュールグラフに登録
|
|
6
6
|
* @param moduleGraph - モジュールグラフ
|
|
7
7
|
* @param compiledModule - HTMLにコンパイルされるPugモジュール
|
|
8
|
-
* @param
|
|
8
|
+
* @param dependencies - compiledModuleの依存ファイルパス配列
|
|
9
9
|
*/
|
|
10
|
-
const
|
|
10
|
+
const registerDependencies = (moduleGraph, compiledModule, dependencies) => {
|
|
11
11
|
// モジュールマップに祖先を追加
|
|
12
|
-
for (const
|
|
12
|
+
for (const dependency of dependencies) {
|
|
13
13
|
try {
|
|
14
|
-
const
|
|
15
|
-
let
|
|
16
|
-
if (
|
|
17
|
-
|
|
14
|
+
const depModules = moduleGraph.getModulesByFile(dependency);
|
|
15
|
+
let depModule;
|
|
16
|
+
if (depModules && depModules.size > 0) {
|
|
17
|
+
depModule = [...depModules][0];
|
|
18
18
|
}
|
|
19
19
|
else {
|
|
20
20
|
// Vite 7では createFileOnlyEntry の代わりに ensureEntryFromUrl を使用
|
|
21
|
-
const
|
|
22
|
-
|
|
21
|
+
const depUrl = dependency.replace(process.cwd(), '').replace(/\\/g, '/');
|
|
22
|
+
depModule = moduleGraph.getModuleById(depUrl) || undefined;
|
|
23
23
|
}
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
compiledModule.importedModules.add(
|
|
24
|
+
if (depModule) {
|
|
25
|
+
depModule.importers.add(compiledModule); // TODO: 依存関係から削除された場合の処理
|
|
26
|
+
compiledModule.importedModules.add(depModule); // オプション
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
catch (error) {
|
|
30
30
|
// 祖先モジュールの処理に失敗した場合はログを出力して続行
|
|
31
|
-
outputLog('warn', '
|
|
31
|
+
outputLog('warn', 'dependency module processing failed:', dependency);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
};
|
|
@@ -63,9 +63,9 @@ export const compilePug = async (moduleGraph, url, pugPath, options, locals) =>
|
|
|
63
63
|
const map = null;
|
|
64
64
|
const compiledTemplate = compileFile(pugPath, options);
|
|
65
65
|
// Pugコンパイラから祖先情報を取得
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
|
|
66
|
+
const dependencies = compiledTemplate.dependencies;
|
|
67
|
+
if (dependencies.length > 0) {
|
|
68
|
+
registerDependencies(moduleGraph, compiledModule, dependencies);
|
|
69
69
|
}
|
|
70
70
|
// HTML生成
|
|
71
71
|
const code = compiledTemplate(locals);
|
|
@@ -74,11 +74,7 @@ export const compilePug = async (moduleGraph, url, pugPath, options, locals) =>
|
|
|
74
74
|
return true;
|
|
75
75
|
}
|
|
76
76
|
catch (error) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
if (error instanceof Error) {
|
|
80
|
-
return error;
|
|
81
|
-
}
|
|
82
|
-
return new Error(`Pug compilation failed: ${errorMessage}`);
|
|
77
|
+
outputLog('error', 'compilation failed:', pugPath, String(error));
|
|
78
|
+
return error instanceof Error ? error : new Error(String(error));
|
|
83
79
|
}
|
|
84
80
|
};
|
package/dist/serve.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type Picomatch from 'picomatch';
|
|
|
5
5
|
/**
|
|
6
6
|
* 開発サーバー設定
|
|
7
7
|
*/
|
|
8
|
-
interface ServeSettings {
|
|
8
|
+
export interface ServeSettings {
|
|
9
9
|
/** Pugコンパイルオプション */
|
|
10
10
|
readonly options?: Pug.Options;
|
|
11
11
|
/** Pugローカル変数オブジェクト */
|
|
@@ -24,6 +24,5 @@ export type Middleware = (req: Connect.IncomingMessage, res: http.ServerResponse
|
|
|
24
24
|
* @param settings - サーブ設定
|
|
25
25
|
* @returns Viteプラグイン
|
|
26
26
|
*/
|
|
27
|
-
export declare const vitePluginPugServe: (settings
|
|
28
|
-
export {};
|
|
27
|
+
export declare const vitePluginPugServe: (settings?: ServeSettings) => Plugin;
|
|
29
28
|
//# sourceMappingURL=serve.d.ts.map
|
package/dist/serve.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../src/serve.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAEjC,OAAO,KAAK,GAAG,MAAM,KAAK,CAAA;AAC1B,OAAO,KAAK,EAAE,MAAM,EAAiB,OAAO,EAAE,MAAM,MAAM,CAAA;AAE1D,OAAO,KAAK,SAAS,MAAM,WAAW,CAAA;AAKtC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../src/serve.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAEjC,OAAO,KAAK,GAAG,MAAM,KAAK,CAAA;AAC1B,OAAO,KAAK,EAAE,MAAM,EAAiB,OAAO,EAAE,MAAM,MAAM,CAAA;AAE1D,OAAO,KAAK,SAAS,MAAM,WAAW,CAAA;AAKtC;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,oBAAoB;IACpB,QAAQ,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IAC9B,sBAAsB;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,YAAY,CAAA;IAClC,4BAA4B;IAC5B,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,CAAC,IAAI,CAAA;IACvC,2BAA2B;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,CACvB,GAAG,EAAE,OAAO,CAAC,eAAe,EAC5B,GAAG,EAAE,IAAI,CAAC,cAAc,EACxB,IAAI,EAAE,OAAO,CAAC,YAAY,KACvB,IAAI,GAAG,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,CAAA;AA8FrE;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,WAAW,aAAa,KAAG,MAiC7D,CAAA"}
|
package/dist/serve.js
CHANGED
|
@@ -74,7 +74,7 @@ const createMiddleware = (settings, server) => {
|
|
|
74
74
|
* @returns Viteプラグイン
|
|
75
75
|
*/
|
|
76
76
|
export const vitePluginPugServe = (settings) => {
|
|
77
|
-
const { reload } = settings;
|
|
77
|
+
const { reload } = settings ?? {};
|
|
78
78
|
let server;
|
|
79
79
|
return {
|
|
80
80
|
name: 'vite-plugin-pug-serve',
|
|
@@ -82,7 +82,7 @@ export const vitePluginPugServe = (settings) => {
|
|
|
82
82
|
apply: 'serve',
|
|
83
83
|
configureServer(_server) {
|
|
84
84
|
server = _server;
|
|
85
|
-
server.middlewares.use(createMiddleware(settings, server));
|
|
85
|
+
server.middlewares.use(createMiddleware(settings ?? {}, server));
|
|
86
86
|
},
|
|
87
87
|
handleHotUpdate(context) {
|
|
88
88
|
const fileModules = server.moduleGraph.getModulesByFile(context.file);
|
package/package.json
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "vite-pug-static-builder",
|
|
3
|
-
"version": "1.0.2
|
|
4
|
-
"description": "Vite + Pugを使用した静的サイトビルダー - 複数のPugファイルを静的HTMLとしてビルドするViteプラグイン",
|
|
5
|
-
"author": "maigo999",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"homepage": "https://github.com/ozekimasaki/vite-pug-static-builder#readme",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "https://github.com/ozekimasaki/vite-pug-static-builder.git"
|
|
11
|
-
},
|
|
12
|
-
"bugs": {
|
|
13
|
-
"url": "https://github.com/ozekimasaki/vite-pug-static-builder/issues"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"vite",
|
|
17
|
-
"vite-plugin",
|
|
18
|
-
"static",
|
|
19
|
-
"pug",
|
|
20
|
-
"static-site",
|
|
21
|
-
"site-builder",
|
|
22
|
-
"html-generator"
|
|
23
|
-
],
|
|
24
|
-
"files": [
|
|
25
|
-
"dist"
|
|
26
|
-
],
|
|
27
|
-
"type": "module",
|
|
28
|
-
"main": "./dist/index.js",
|
|
29
|
-
"types": "./dist/index.d.ts",
|
|
30
|
-
"exports": {
|
|
31
|
-
".": {
|
|
32
|
-
"import": "./dist/index.js",
|
|
33
|
-
"types": "./dist/index.d.ts"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"scripts": {
|
|
37
|
-
"clean": "rimraf ./dist",
|
|
38
|
-
"type-check": "tsc --noEmit -p .",
|
|
39
|
-
"test:vite6": "cross-env VITE_MAJOR_VERSION=6 vitest run",
|
|
40
|
-
"test:vite7": "cross-env VITE_MAJOR_VERSION=7 vitest run",
|
|
41
|
-
"test": "pnpm test:vite7",
|
|
42
|
-
"test:update": "vitest run -u",
|
|
43
|
-
"test:watch": "vitest",
|
|
44
|
-
"coverage": "cross-env VITE_MAJOR_VERSION=7 vitest run --coverage",
|
|
45
|
-
"tsc": "tsc -p .",
|
|
46
|
-
"build": "pnpm clean && pnpm tsc",
|
|
47
|
-
"prepublishOnly": "pnpm
|
|
48
|
-
},
|
|
49
|
-
"dependencies": {
|
|
50
|
-
"ansis": "^3.2.0",
|
|
51
|
-
"picomatch": "^4.0.2",
|
|
52
|
-
"pug": "^3.0.3"
|
|
53
|
-
},
|
|
54
|
-
"peerDependencies": {
|
|
55
|
-
"pug": "^3.0.0",
|
|
56
|
-
"vite": "^6.0.0 || ^7.0.0
|
|
57
|
-
},
|
|
58
|
-
"devDependencies": {
|
|
59
|
-
"@types/picomatch": "^2.3.3",
|
|
60
|
-
"@types/pug": "^2.0.10",
|
|
61
|
-
"@vitest/coverage-v8": "^3.2.1",
|
|
62
|
-
"axios": "^1.7.9",
|
|
63
|
-
"cross-env": "^7.0.3",
|
|
64
|
-
"fs-extra": "^11.3.0",
|
|
65
|
-
"rimraf": "^6.0.1",
|
|
66
|
-
"typescript": "^5.6.3",
|
|
67
|
-
"vite": "^
|
|
68
|
-
"vitest": "^3.2.1"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "vite-pug-static-builder",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Vite + Pugを使用した静的サイトビルダー - 複数のPugファイルを静的HTMLとしてビルドするViteプラグイン",
|
|
5
|
+
"author": "maigo999",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://github.com/ozekimasaki/vite-pug-static-builder#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/ozekimasaki/vite-pug-static-builder.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/ozekimasaki/vite-pug-static-builder/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"vite",
|
|
17
|
+
"vite-plugin",
|
|
18
|
+
"static",
|
|
19
|
+
"pug",
|
|
20
|
+
"static-site",
|
|
21
|
+
"site-builder",
|
|
22
|
+
"html-generator"
|
|
23
|
+
],
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"type": "module",
|
|
28
|
+
"main": "./dist/index.js",
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"import": "./dist/index.js",
|
|
33
|
+
"types": "./dist/index.d.ts"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"clean": "rimraf ./dist",
|
|
38
|
+
"type-check": "tsc --noEmit -p .",
|
|
39
|
+
"test:vite6": "cross-env VITE_MAJOR_VERSION=6 vitest run",
|
|
40
|
+
"test:vite7": "cross-env VITE_MAJOR_VERSION=7 vitest run",
|
|
41
|
+
"test": "pnpm test:vite7",
|
|
42
|
+
"test:update": "vitest run -u",
|
|
43
|
+
"test:watch": "vitest",
|
|
44
|
+
"coverage": "cross-env VITE_MAJOR_VERSION=7 vitest run --coverage",
|
|
45
|
+
"tsc": "tsc -p .",
|
|
46
|
+
"build": "pnpm clean && pnpm tsc",
|
|
47
|
+
"prepublishOnly": "pnpm build"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"ansis": "^3.2.0",
|
|
51
|
+
"picomatch": "^4.0.2",
|
|
52
|
+
"pug": "^3.0.3"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"pug": "^3.0.0",
|
|
56
|
+
"vite": "^6.0.0 || ^7.0.0"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@types/picomatch": "^2.3.3",
|
|
60
|
+
"@types/pug": "^2.0.10",
|
|
61
|
+
"@vitest/coverage-v8": "^3.2.1",
|
|
62
|
+
"axios": "^1.7.9",
|
|
63
|
+
"cross-env": "^7.0.3",
|
|
64
|
+
"fs-extra": "^11.3.0",
|
|
65
|
+
"rimraf": "^6.0.1",
|
|
66
|
+
"typescript": "^5.6.3",
|
|
67
|
+
"vite": "^7.0.0",
|
|
68
|
+
"vitest": "^3.2.1"
|
|
69
|
+
}
|
|
70
|
+
}
|