@studiokloek/vite-config 0.13.2 → 0.14.0
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 +114 -9
- package/bin/assets.js +8 -0
- package/bin/build.js +6 -61
- package/bin/development.js +6 -23
- package/dist/cli.d.ts +6 -0
- package/dist/cli.js +64 -0
- package/dist/commands-ujEjJD4C.js +862 -0
- package/dist/index.d.ts +207 -45
- package/dist/index.js +2 -798
- package/package.json +67 -83
- package/dist/config.d.ts +0 -2
- package/dist/plugins/base.d.ts +0 -3
- package/dist/plugins/build.d.ts +0 -3
- package/dist/plugins/lib/clean-plugin.d.ts +0 -2
- package/dist/plugins/lib/handlebars/context.d.ts +0 -2
- package/dist/plugins/lib/handlebars/handlebars-plugin.d.ts +0 -3
- package/dist/plugins/lib/handlebars/partials.d.ts +0 -4
- package/dist/plugins/lib/html-plugin.d.ts +0 -3
- package/dist/plugins/lib/image-plugin.d.ts +0 -3
- package/dist/plugins/lib/manifest-plugin.d.ts +0 -3
- package/dist/plugins/serve.d.ts +0 -6
- package/dist/public.d.ts +0 -49
- package/dist/utils/build.d.ts +0 -3
- package/dist/utils/cwd.d.ts +0 -1
- package/dist/utils/game.d.ts +0 -5
- package/dist/utils/hash.d.ts +0 -2
- package/dist/utils/index.d.ts +0 -6
- package/dist/utils/interfaces.d.ts +0 -78
- package/dist/utils/json.d.ts +0 -1
- package/dist/utils/pkg.d.ts +0 -2
- package/dist/utils/zip.d.ts +0 -1
- /package/{dist/partials → partials}/development.hbs +0 -0
package/package.json
CHANGED
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studiokloek/vite-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
|
+
"description": "Base Vite config and CLI for our game projects.",
|
|
4
5
|
"type": "module",
|
|
5
6
|
"license": "MIT",
|
|
6
7
|
"author": "Martijn Swart <opensource@studiokloek.nl> (https://studiokloek.nl)",
|
|
7
|
-
"
|
|
8
|
-
"homepage": "https://github.com/studiokloek/vite-config/tree/main/#readme",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": "./dist/index.js",
|
|
11
|
-
"./package.json": "./package.json"
|
|
12
|
-
},
|
|
13
|
-
"main": "dist/index.js",
|
|
14
|
-
"types": "dist/index.d.ts",
|
|
15
|
-
"bin": {
|
|
16
|
-
"kloek-build": "./bin/build.js",
|
|
17
|
-
"kloek-development": "./bin/development.js"
|
|
18
|
-
},
|
|
8
|
+
"homepage": "https://github.com/studiokloek/vite-config#readme",
|
|
19
9
|
"repository": {
|
|
20
10
|
"type": "git",
|
|
21
11
|
"url": "git+https://github.com/studiokloek/vite-config.git"
|
|
@@ -23,90 +13,84 @@
|
|
|
23
13
|
"bugs": {
|
|
24
14
|
"url": "https://github.com/studiokloek/vite-config/issues"
|
|
25
15
|
},
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
"types/roll": "api-extractor run",
|
|
35
|
-
"types/clean": "rimraf tmp/types",
|
|
36
|
-
"prepublishOnly": "run-s build",
|
|
37
|
-
"release": "run-s build release/publish",
|
|
38
|
-
"release/publish": "npx np"
|
|
39
|
-
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"vite",
|
|
18
|
+
"vite-config",
|
|
19
|
+
"svelte",
|
|
20
|
+
"handlebars",
|
|
21
|
+
"pixi",
|
|
22
|
+
"games"
|
|
23
|
+
],
|
|
40
24
|
"engines": {
|
|
41
|
-
"node": ">=22"
|
|
25
|
+
"node": ">=22.19"
|
|
42
26
|
},
|
|
43
|
-
"
|
|
44
|
-
"
|
|
27
|
+
"volta": {
|
|
28
|
+
"node": "24.21.0"
|
|
29
|
+
},
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"default": "./dist/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./cli": {
|
|
36
|
+
"types": "./dist/cli.d.ts",
|
|
37
|
+
"default": "./dist/cli.js"
|
|
38
|
+
},
|
|
39
|
+
"./package.json": "./package.json"
|
|
40
|
+
},
|
|
41
|
+
"main": "./dist/index.js",
|
|
42
|
+
"types": "./dist/index.d.ts",
|
|
43
|
+
"bin": {
|
|
44
|
+
"kloek-assets": "./bin/assets.js",
|
|
45
|
+
"kloek-build": "./bin/build.js",
|
|
46
|
+
"kloek-development": "./bin/development.js"
|
|
45
47
|
},
|
|
46
48
|
"files": [
|
|
47
|
-
"dist
|
|
48
|
-
"bin
|
|
49
|
+
"dist",
|
|
50
|
+
"bin",
|
|
51
|
+
"partials"
|
|
49
52
|
],
|
|
50
53
|
"publishConfig": {
|
|
51
54
|
"access": "public"
|
|
52
55
|
},
|
|
53
56
|
"dependencies": {
|
|
54
|
-
"@
|
|
55
|
-
"@
|
|
56
|
-
"@vitejs/plugin-legacy": "^
|
|
57
|
-
"
|
|
57
|
+
"@studiokloek/vite-assets-plugin": "^0.1.0",
|
|
58
|
+
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
59
|
+
"@vitejs/plugin-legacy": "^8.2.3",
|
|
60
|
+
"cac": "^7.0.0",
|
|
61
|
+
"filenamify": "^7.0.3",
|
|
58
62
|
"handlebars": "^4.7.9",
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"postcss": "^8.5.28",
|
|
65
|
-
"postcss-load-config": "^6.0.1",
|
|
66
|
-
"rollup-plugin-visualizer": "^6.0.11",
|
|
67
|
-
"sass": "1.104.0",
|
|
68
|
-
"stylelint": "^16.26.1",
|
|
69
|
-
"svelte": "^5.57.0",
|
|
70
|
-
"svelte-preprocess": "^6.0.5",
|
|
63
|
+
"html-minifier-next": "^8.7.0",
|
|
64
|
+
"rollup-plugin-visualizer": "^7.1.1",
|
|
65
|
+
"sass": "^1.105.0",
|
|
66
|
+
"sharp": "^0.35.5",
|
|
67
|
+
"svelte": "^5.57.1",
|
|
71
68
|
"terser": "^5.51.2",
|
|
72
|
-
"vite": "
|
|
73
|
-
"vite-plugin-banner": "0.8.1",
|
|
69
|
+
"vite": "^8.3.1",
|
|
74
70
|
"vite-plugin-checker": "^0.14.5",
|
|
75
71
|
"vite-plugin-full-reload": "^1.2.0",
|
|
76
|
-
"vite-plugin-
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"vite-tsconfig-paths": "^5.1.4",
|
|
80
|
-
"zip-a-folder": "^3.1.9"
|
|
72
|
+
"vite-plugin-mkcert": "^2.1.0",
|
|
73
|
+
"zip-a-folder": "^5.0.1",
|
|
74
|
+
"zod": "^4.6.5"
|
|
81
75
|
},
|
|
82
76
|
"devDependencies": {
|
|
83
|
-
"@biomejs/biome": "^2.5.
|
|
84
|
-
"@
|
|
85
|
-
"@
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"@types/estree": "^1.0.9",
|
|
90
|
-
"@types/html-minifier-terser": "^7.0.2",
|
|
91
|
-
"@types/imagemin": "^9.0.1",
|
|
92
|
-
"@types/imagemin-mozjpeg": "^8.0.4",
|
|
93
|
-
"@types/imagemin-optipng": "^5.2.4",
|
|
94
|
-
"@types/node": "^24.13.4",
|
|
95
|
-
"rimraf": "^6.1.3",
|
|
96
|
-
"rollup": "^4.63.1",
|
|
97
|
-
"rollup-plugin-copy": "^3.5.0",
|
|
98
|
-
"tslib": "^2.8.1",
|
|
99
|
-
"typescript": "5.9.3"
|
|
100
|
-
},
|
|
101
|
-
"resolutions": {
|
|
102
|
-
"@types/estree": "1.0.9",
|
|
103
|
-
"@types/imagemin": "9.0.1",
|
|
104
|
-
"@types/node": "24.13.4",
|
|
105
|
-
"vite": "v7.3.6",
|
|
106
|
-
"rollup": "4.63.1"
|
|
77
|
+
"@biomejs/biome": "^2.5.14",
|
|
78
|
+
"@changesets/cli": "^3.0.3",
|
|
79
|
+
"@types/node": "^22.18.0",
|
|
80
|
+
"tsdown": "^0.23.0",
|
|
81
|
+
"typescript": "^7.0.2",
|
|
82
|
+
"vitest": "^5.0.2"
|
|
107
83
|
},
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
84
|
+
"scripts": {
|
|
85
|
+
"build": "tsdown",
|
|
86
|
+
"dev": "tsdown --watch",
|
|
87
|
+
"typecheck": "tsc --noEmit",
|
|
88
|
+
"lint": "biome check .",
|
|
89
|
+
"format": "biome check --write .",
|
|
90
|
+
"test": "vitest run",
|
|
91
|
+
"test:watch": "vitest",
|
|
92
|
+
"changeset": "changeset",
|
|
93
|
+
"ci:version": "changeset version",
|
|
94
|
+
"ci:publish": "pnpm build && changeset publish"
|
|
111
95
|
}
|
|
112
|
-
}
|
|
96
|
+
}
|
package/dist/config.d.ts
DELETED
package/dist/plugins/base.d.ts
DELETED
package/dist/plugins/build.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export type Context = Record<string, unknown> | ((path: string) => Record<string, unknown>) | ((path: string) => Promise<Record<string, unknown>>);
|
|
2
|
-
export declare function resolveContext(context: Context | undefined, pagePath: string): Promise<Record<string, unknown> | undefined>;
|
package/dist/plugins/serve.d.ts
DELETED
package/dist/public.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { TypedFlags } from 'meow';
|
|
2
|
-
|
|
3
|
-
export declare function kloekBuild(flags: TypedFlags<{
|
|
4
|
-
base: {
|
|
5
|
-
type: 'string';
|
|
6
|
-
shortFlag: string;
|
|
7
|
-
default: string;
|
|
8
|
-
};
|
|
9
|
-
mode: {
|
|
10
|
-
type: 'string';
|
|
11
|
-
shortFlag: string;
|
|
12
|
-
default?: string;
|
|
13
|
-
};
|
|
14
|
-
logLevel: {
|
|
15
|
-
type: 'string';
|
|
16
|
-
shortFlag: string;
|
|
17
|
-
default?: string;
|
|
18
|
-
};
|
|
19
|
-
emptyOutDir: {
|
|
20
|
-
type: 'boolean';
|
|
21
|
-
shortFlag: string;
|
|
22
|
-
default: true;
|
|
23
|
-
};
|
|
24
|
-
sourcemaps: {
|
|
25
|
-
type: 'boolean';
|
|
26
|
-
shortFlag: string;
|
|
27
|
-
default: false;
|
|
28
|
-
};
|
|
29
|
-
inlineSourcemaps: {
|
|
30
|
-
type: 'boolean';
|
|
31
|
-
shortFlag: string;
|
|
32
|
-
default: false;
|
|
33
|
-
};
|
|
34
|
-
createZip: {
|
|
35
|
-
type: 'boolean';
|
|
36
|
-
shortFlag: string;
|
|
37
|
-
default: false;
|
|
38
|
-
};
|
|
39
|
-
}>): Promise<void>;
|
|
40
|
-
|
|
41
|
-
export declare function kloekDevelopment(flags: TypedFlags<{
|
|
42
|
-
mode: {
|
|
43
|
-
type: 'string';
|
|
44
|
-
shortFlag: string;
|
|
45
|
-
default?: string;
|
|
46
|
-
};
|
|
47
|
-
}>): Promise<void>;
|
|
48
|
-
|
|
49
|
-
export { }
|
package/dist/utils/build.d.ts
DELETED
package/dist/utils/cwd.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const cwd: string;
|
package/dist/utils/game.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { GameSettings, GamesSettings, GamesSettingsData, KloekViteConfig, PackageGamesSettings } from './interfaces';
|
|
2
|
-
export declare function parsePackageGamesSettings(packageSettings: PackageGamesSettings, version: string): GamesSettingsData;
|
|
3
|
-
export declare function pathToGameData(fullFilePath: string, settings: GamesSettings): GameSettings | undefined;
|
|
4
|
-
export declare function getPageToServe(config: KloekViteConfig, settings: GamesSettings): string;
|
|
5
|
-
export declare function getPageIdFromUrl(url: string): string;
|
package/dist/utils/hash.d.ts
DELETED
package/dist/utils/index.d.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import type { ConfigEnv } from 'vite';
|
|
2
|
-
export type ImageQualityConfig = {
|
|
3
|
-
jpeg: number;
|
|
4
|
-
png: [number, number];
|
|
5
|
-
};
|
|
6
|
-
export type KloekViteDevConfig = {
|
|
7
|
-
serveParams: string;
|
|
8
|
-
fullReloadSvelte?: boolean;
|
|
9
|
-
cors?: boolean;
|
|
10
|
-
https?: boolean;
|
|
11
|
-
};
|
|
12
|
-
export type KloekViteServeConfig = {
|
|
13
|
-
partials: string | string[];
|
|
14
|
-
};
|
|
15
|
-
export type KloekViteBuildConfig = {
|
|
16
|
-
basePath: string;
|
|
17
|
-
legacy?: boolean;
|
|
18
|
-
browserslist?: string | string[];
|
|
19
|
-
imageQuality: ImageQualityConfig;
|
|
20
|
-
manifest?: boolean;
|
|
21
|
-
analyzeBundle?: boolean;
|
|
22
|
-
sourceMaps?: boolean | 'inline' | 'hidden';
|
|
23
|
-
createZip?: boolean;
|
|
24
|
-
cleanPatterns?: Array<string>;
|
|
25
|
-
};
|
|
26
|
-
export type KloekViteConfig = {
|
|
27
|
-
dev: KloekViteDevConfig;
|
|
28
|
-
serve: KloekViteServeConfig;
|
|
29
|
-
build: KloekViteBuildConfig;
|
|
30
|
-
};
|
|
31
|
-
export type GameSettingsProperty = 'info' | 'meta' | 'options';
|
|
32
|
-
export type GameSettings = {
|
|
33
|
-
info: {
|
|
34
|
-
id: string;
|
|
35
|
-
page: string;
|
|
36
|
-
version: string;
|
|
37
|
-
client: string;
|
|
38
|
-
year: number;
|
|
39
|
-
};
|
|
40
|
-
meta: {
|
|
41
|
-
title: string;
|
|
42
|
-
description: string;
|
|
43
|
-
apptitle: string;
|
|
44
|
-
};
|
|
45
|
-
options: {
|
|
46
|
-
backgroundColor: string;
|
|
47
|
-
orientation: string;
|
|
48
|
-
fullscreen: string;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
export type GamesSettings = Record<string, GameSettings>;
|
|
52
|
-
export type GamesSettingsData = {
|
|
53
|
-
development: GameSettings;
|
|
54
|
-
games: GamesSettings;
|
|
55
|
-
};
|
|
56
|
-
export type PackageGamesSettings = {
|
|
57
|
-
generic: GameSettings;
|
|
58
|
-
games: GameSettings[];
|
|
59
|
-
};
|
|
60
|
-
export type ViteOptions = {
|
|
61
|
-
root: string;
|
|
62
|
-
package: {
|
|
63
|
-
version: string;
|
|
64
|
-
name: string;
|
|
65
|
-
description: string;
|
|
66
|
-
};
|
|
67
|
-
environment: ConfigEnv;
|
|
68
|
-
settings: GamesSettingsData;
|
|
69
|
-
config: KloekViteConfig;
|
|
70
|
-
};
|
|
71
|
-
export type PackageConfig = {
|
|
72
|
-
vite: KloekViteConfig;
|
|
73
|
-
settings: PackageGamesSettings;
|
|
74
|
-
browserslist: string | string[];
|
|
75
|
-
version: string;
|
|
76
|
-
name: string;
|
|
77
|
-
description: string;
|
|
78
|
-
};
|
package/dist/utils/json.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function readJSON(path: string): unknown;
|
package/dist/utils/pkg.d.ts
DELETED
package/dist/utils/zip.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function addBuildFolderToZip(): Promise<void>;
|
|
File without changes
|