@zthun/janitor-build-config 19.0.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/dist/vite.js ADDED
@@ -0,0 +1,335 @@
1
+ import { cloneDeep } from 'lodash-es';
2
+ import swc from 'unplugin-swc';
3
+ import dtsPlugin from 'vite-plugin-dts';
4
+ import { externalizeDeps } from 'vite-plugin-externalize-deps';
5
+ import tsConfigPaths from 'vite-tsconfig-paths';
6
+
7
+ function _define_property$2(obj, key, value) {
8
+ if (key in obj) {
9
+ Object.defineProperty(obj, key, {
10
+ value: value,
11
+ enumerable: true,
12
+ configurable: true,
13
+ writable: true
14
+ });
15
+ } else {
16
+ obj[key] = value;
17
+ }
18
+ return obj;
19
+ }
20
+ function _object_spread(target) {
21
+ for(var i = 1; i < arguments.length; i++){
22
+ var source = arguments[i] != null ? arguments[i] : {};
23
+ var ownKeys = Object.keys(source);
24
+ if (typeof Object.getOwnPropertySymbols === "function") {
25
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
26
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
27
+ }));
28
+ }
29
+ ownKeys.forEach(function(key) {
30
+ _define_property$2(target, key, source[key]);
31
+ });
32
+ }
33
+ return target;
34
+ }
35
+ function ownKeys(object, enumerableOnly) {
36
+ var keys = Object.keys(object);
37
+ if (Object.getOwnPropertySymbols) {
38
+ var symbols = Object.getOwnPropertySymbols(object);
39
+ keys.push.apply(keys, symbols);
40
+ }
41
+ return keys;
42
+ }
43
+ function _object_spread_props(target, source) {
44
+ source = source != null ? source : {};
45
+ if (Object.getOwnPropertyDescriptors) {
46
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
47
+ } else {
48
+ ownKeys(Object(source)).forEach(function(key) {
49
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
50
+ });
51
+ }
52
+ return target;
53
+ }
54
+ /**
55
+ * A builder for Vite library configurations.
56
+ */ class ZViteLibraryBuilder {
57
+ /**
58
+ * Adds an entry point to the library.
59
+ *
60
+ * @param name -
61
+ * The name of the entry point.
62
+ * @param path -
63
+ * The path to the entry point file.
64
+ *
65
+ * @returns
66
+ * This object.
67
+ */ entry(name, path) {
68
+ this.library.entry = _object_spread_props(_object_spread({}, this.library.entry), {
69
+ [name]: path
70
+ });
71
+ return this;
72
+ }
73
+ /**
74
+ * A shorthand for adding an entry point
75
+ * named "index" that points to "src/index.ts"
76
+ *
77
+ * @returns
78
+ * This object.
79
+ */ index() {
80
+ return this.entry("index", "./src/index.ts");
81
+ }
82
+ /**
83
+ * Returns the built library configuration.
84
+ *
85
+ * @returns
86
+ * A deep clone of the library configuration.
87
+ */ build() {
88
+ return cloneDeep(this.library);
89
+ }
90
+ constructor(){
91
+ _define_property$2(this, "library", {
92
+ entry: {},
93
+ formats: [
94
+ "es",
95
+ "cjs"
96
+ ]
97
+ });
98
+ }
99
+ }
100
+
101
+ function _define_property$1(obj, key, value) {
102
+ if (key in obj) {
103
+ Object.defineProperty(obj, key, {
104
+ value: value,
105
+ enumerable: true,
106
+ configurable: true,
107
+ writable: true
108
+ });
109
+ } else {
110
+ obj[key] = value;
111
+ }
112
+ return obj;
113
+ }
114
+ /**
115
+ * A builder for test configurations found in vite's defineConfig test field.
116
+ */ class ZViteTestBuilder {
117
+ /**
118
+ * Sets the test environment.
119
+ *
120
+ * @param environment -
121
+ * The test environment to use.
122
+ *
123
+ * @returns
124
+ * This object.
125
+ */ environment(environment) {
126
+ this.test.environment = environment;
127
+ return this;
128
+ }
129
+ /**
130
+ * Sets the test coverage provider.
131
+ *
132
+ * @param provider -
133
+ * The test coverage provider to use.
134
+ *
135
+ * @returns
136
+ * This object.
137
+ */ coverage(provider) {
138
+ this.test.coverage.provider = provider;
139
+ return this;
140
+ }
141
+ /**
142
+ * Returns the built test configuration.
143
+ *
144
+ * @returns
145
+ * A deep clone of the test configuration.
146
+ */ build() {
147
+ return cloneDeep(this.test);
148
+ }
149
+ /**
150
+ * Initializes a new instance of this object.
151
+ */ constructor(){
152
+ _define_property$1(this, "test", void 0);
153
+ /**
154
+ * Sets the test environment to "node".
155
+ *
156
+ * @returns
157
+ * This object.
158
+ */ _define_property$1(this, "node", this.environment.bind(this, "node"));
159
+ /**
160
+ * Sets the test environment to "happy-dom".
161
+ *
162
+ * @returns
163
+ * This object.
164
+ */ _define_property$1(this, "browser", this.environment.bind(this, "happy-dom"));
165
+ /**
166
+ * Sets the test coverage provider to "v8".
167
+ *
168
+ * @returns
169
+ * This object.
170
+ */ _define_property$1(this, "v8", this.coverage.bind(this, "v8"));
171
+ /**
172
+ * Sets the test coverage provider to "istanbul".
173
+ *
174
+ * @returns
175
+ * This object.
176
+ */ _define_property$1(this, "istanbul", this.coverage.bind(this, "istanbul"));
177
+ this.test = {
178
+ environment: "node",
179
+ testTimeout: 30000,
180
+ coverage: {
181
+ all: false,
182
+ provider: undefined
183
+ }
184
+ };
185
+ }
186
+ }
187
+
188
+ function _define_property(obj, key, value) {
189
+ if (key in obj) {
190
+ Object.defineProperty(obj, key, {
191
+ value: value,
192
+ enumerable: true,
193
+ configurable: true,
194
+ writable: true
195
+ });
196
+ } else {
197
+ obj[key] = value;
198
+ }
199
+ return obj;
200
+ }
201
+ /**
202
+ * A config builder for the vite build system.
203
+ *
204
+ * This is helpful when building different types
205
+ * of projects and keeping a standard.
206
+ *
207
+ * @example vite.config.ts
208
+ *
209
+ * ```ts
210
+ * // Before Config Builder
211
+ * export default defineConfig({
212
+ * build: {
213
+ * lib: {
214
+ * entry: {
215
+ * index: "./src/index.ts",
216
+ * },
217
+ * formats: ["cjs", "es"],
218
+ * },
219
+ * },
220
+ * minify: false,
221
+ * sourceMap: true,
222
+ * plugins: [
223
+ * swc.vite(),
224
+ * tsConfigPaths(),
225
+ * externalizeDeps(),
226
+ * dtsPlugin({
227
+ * compilerOptions: {
228
+ * paths: {},
229
+ * },
230
+ * }),
231
+ * ],
232
+ * });
233
+ * ```
234
+ *
235
+ * ```ts
236
+ * // After config builder
237
+ * const config = new ZViteConfigBuilder().library().build();
238
+ * export default defineConfig(config);
239
+ * ```
240
+ */ class ZViteConfigBuilder {
241
+ /**
242
+ * Sets vite into library mode.
243
+ *
244
+ * @param options -
245
+ * The options for the library. You can set this to
246
+ * nothing to use the default library which looks for
247
+ * an entry point at the source directory called index.ts
248
+ *
249
+ * @see {@link ZViteLibraryBuilder} for more information.
250
+ *
251
+ * @returns
252
+ * This object.
253
+ */ library(options = new ZViteLibraryBuilder().index().build()) {
254
+ this.config.build.lib = options;
255
+ // There is almost no value to minifying a library unless you
256
+ // are bundling it for importing via html.
257
+ // Thus, just turn off the minify and enable the source map
258
+ // This makes it much easier for other devs to debug problems
259
+ this.config.build.minify = false;
260
+ this.config.build.sourcemap = true;
261
+ // When using a library, we also want to make sure we externalize the
262
+ // dependencies automatically -> it blows my mind why vite doesn't
263
+ // do this out of the box. I guess there's some reason or some
264
+ // use case to bundle all the dependencies; I just don't see it.
265
+ this.config.plugins = [
266
+ ...this.config.plugins,
267
+ externalizeDeps(),
268
+ dtsPlugin({
269
+ compilerOptions: {
270
+ // Always turn off paths when building for production. You want to make
271
+ // sure that your build is building in the correct order and that your
272
+ // actual paths are correct.
273
+ paths: {}
274
+ }
275
+ })
276
+ ];
277
+ return this;
278
+ }
279
+ /**
280
+ * Constructs the config to act as if it's compiling a node application.
281
+ *
282
+ * This is just an alias to {@link ZViteConfigBuilder.library} with two
283
+ * entry points.
284
+ *
285
+ * 1. The file src/cli.ts is the main entry point of the application.
286
+ * 1. The file, src/index.ts, is the api for importing
287
+ *
288
+ * @returns
289
+ * This object.
290
+ */ cli() {
291
+ // A cli works similar to a library. Vite isn't the best when it comes
292
+ // to building complex node apps, but for simple cli tools and non
293
+ // framework based servers, you can do it.
294
+ const library = new ZViteLibraryBuilder().entry("index", "src/index.ts").entry("cli", "src/cli.ts").build();
295
+ return this.library(library);
296
+ }
297
+ /**
298
+ * Constructs the config to be for testing.
299
+ */ test(options = new ZViteTestBuilder().node().istanbul().build()) {
300
+ this.config.test = options;
301
+ return this;
302
+ }
303
+ /**
304
+ * Returns the currently built config.
305
+ *
306
+ * @returns
307
+ * The currently built config.
308
+ */ build() {
309
+ return cloneDeep(this.config);
310
+ }
311
+ /**
312
+ * Initializes a new instance of this object.
313
+ *
314
+ * @param _dirname -
315
+ * The directory that is housing the vite.config
316
+ * file. Pass __dirname to this.
317
+ */ constructor(_dirname){
318
+ _define_property(this, "_dirname", void 0);
319
+ _define_property(this, "config", void 0);
320
+ this._dirname = _dirname;
321
+ this.config = {
322
+ build: {
323
+ minify: true,
324
+ sourcemap: false
325
+ },
326
+ plugins: [
327
+ swc.vite(),
328
+ tsConfigPaths()
329
+ ]
330
+ };
331
+ }
332
+ }
333
+
334
+ export { ZViteConfigBuilder, ZViteLibraryBuilder, ZViteTestBuilder };
335
+ //# sourceMappingURL=vite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.js","sources":["../src/vite/vite-library-builder.mts","../src/vite/vite-test-builder.mts","../src/vite/vite-config-builder.mts"],"sourcesContent":["import { cloneDeep } from \"lodash-es\";\nimport { LibraryOptions } from \"vite\";\n\n/**\n * A builder for Vite library configurations.\n */\nexport class ZViteLibraryBuilder {\n private library: LibraryOptions = {\n entry: {},\n formats: [\"es\", \"cjs\"],\n };\n\n /**\n * Adds an entry point to the library.\n *\n * @param name -\n * The name of the entry point.\n * @param path -\n * The path to the entry point file.\n *\n * @returns\n * This object.\n */\n public entry(name: string, path: string) {\n this.library.entry = {\n ...(this.library.entry as Record<string, string>),\n [name]: path,\n };\n return this;\n }\n\n /**\n * A shorthand for adding an entry point\n * named \"index\" that points to \"src/index.ts\"\n *\n * @returns\n * This object.\n */\n public index() {\n return this.entry(\"index\", \"./src/index.ts\");\n }\n\n /**\n * Returns the built library configuration.\n *\n * @returns\n * A deep clone of the library configuration.\n */\n public build() {\n return cloneDeep(this.library);\n }\n}\n","import { cloneDeep } from \"lodash-es\";\nimport { InlineConfig, VitestEnvironment } from \"vitest/node\";\n\n/**\n * A builder for test configurations found in vite's defineConfig test field.\n */\nexport class ZViteTestBuilder {\n private test: InlineConfig;\n\n /**\n * Initializes a new instance of this object.\n */\n public constructor() {\n this.test = {\n environment: \"node\",\n testTimeout: 30000,\n coverage: {\n all: false,\n provider: undefined,\n },\n };\n }\n\n /**\n * Sets the test environment.\n *\n * @param environment -\n * The test environment to use.\n *\n * @returns\n * This object.\n */\n public environment(environment: VitestEnvironment) {\n this.test.environment = environment;\n return this;\n }\n\n /**\n * Sets the test environment to \"node\".\n *\n * @returns\n * This object.\n */\n public node = this.environment.bind(this, \"node\");\n\n /**\n * Sets the test environment to \"happy-dom\".\n *\n * @returns\n * This object.\n */\n public browser = this.environment.bind(this, \"happy-dom\");\n\n /**\n * Sets the test coverage provider.\n *\n * @param provider -\n * The test coverage provider to use.\n *\n * @returns\n * This object.\n */\n public coverage(provider: \"v8\" | \"istanbul\") {\n this.test.coverage.provider = provider;\n return this;\n }\n\n /**\n * Sets the test coverage provider to \"v8\".\n *\n * @returns\n * This object.\n */\n public v8 = this.coverage.bind(this, \"v8\");\n\n /**\n * Sets the test coverage provider to \"istanbul\".\n *\n * @returns\n * This object.\n */\n public istanbul = this.coverage.bind(this, \"istanbul\");\n\n /**\n * Returns the built test configuration.\n *\n * @returns\n * A deep clone of the test configuration.\n */\n public build() {\n return cloneDeep(this.test);\n }\n}\n","import { cloneDeep } from \"lodash-es\";\nimport swc from \"unplugin-swc\";\nimport { LibraryOptions, UserConfig } from \"vite\";\nimport dtsPlugin from \"vite-plugin-dts\";\nimport { externalizeDeps } from \"vite-plugin-externalize-deps\";\nimport tsConfigPaths from \"vite-tsconfig-paths\";\nimport { InlineConfig as TestConfig } from \"vitest/node.js\";\nimport { ZViteLibraryBuilder } from \"./vite-library-builder.mjs\";\nimport { ZViteTestBuilder } from \"./vite-test-builder.mjs\";\n\n/**\n * A config builder for the vite build system.\n *\n * This is helpful when building different types\n * of projects and keeping a standard.\n *\n * @example vite.config.ts\n *\n * ```ts\n * // Before Config Builder\n * export default defineConfig({\n * build: {\n * lib: {\n * entry: {\n * index: \"./src/index.ts\",\n * },\n * formats: [\"cjs\", \"es\"],\n * },\n * },\n * minify: false,\n * sourceMap: true,\n * plugins: [\n * swc.vite(),\n * tsConfigPaths(),\n * externalizeDeps(),\n * dtsPlugin({\n * compilerOptions: {\n * paths: {},\n * },\n * }),\n * ],\n * });\n * ```\n *\n * ```ts\n * // After config builder\n * const config = new ZViteConfigBuilder().library().build();\n * export default defineConfig(config);\n * ```\n */\nexport class ZViteConfigBuilder {\n private config: UserConfig;\n\n /**\n * Initializes a new instance of this object.\n *\n * @param _dirname -\n * The directory that is housing the vite.config\n * file. Pass __dirname to this.\n */\n public constructor(private _dirname: string) {\n this.config = {\n build: {\n minify: true,\n sourcemap: false,\n },\n plugins: [swc.vite(), tsConfigPaths()],\n };\n }\n\n /**\n * Sets vite into library mode.\n *\n * @param options -\n * The options for the library. You can set this to\n * nothing to use the default library which looks for\n * an entry point at the source directory called index.ts\n *\n * @see {@link ZViteLibraryBuilder} for more information.\n *\n * @returns\n * This object.\n */\n public library(\n options: LibraryOptions = new ZViteLibraryBuilder().index().build(),\n ) {\n this.config.build.lib = options;\n\n // There is almost no value to minifying a library unless you\n // are bundling it for importing via html.\n // Thus, just turn off the minify and enable the source map\n // This makes it much easier for other devs to debug problems\n this.config.build.minify = false;\n this.config.build.sourcemap = true;\n\n // When using a library, we also want to make sure we externalize the\n // dependencies automatically -> it blows my mind why vite doesn't\n // do this out of the box. I guess there's some reason or some\n // use case to bundle all the dependencies; I just don't see it.\n this.config.plugins = [\n ...this.config.plugins,\n externalizeDeps(),\n dtsPlugin({\n compilerOptions: {\n // Always turn off paths when building for production. You want to make\n // sure that your build is building in the correct order and that your\n // actual paths are correct.\n paths: {},\n },\n }),\n ];\n\n return this;\n }\n\n /**\n * Constructs the config to act as if it's compiling a node application.\n *\n * This is just an alias to {@link ZViteConfigBuilder.library} with two\n * entry points.\n *\n * 1. The file src/cli.ts is the main entry point of the application.\n * 1. The file, src/index.ts, is the api for importing\n *\n * @returns\n * This object.\n */\n public cli() {\n // A cli works similar to a library. Vite isn't the best when it comes\n // to building complex node apps, but for simple cli tools and non\n // framework based servers, you can do it.\n const library = new ZViteLibraryBuilder()\n .entry(\"index\", \"src/index.ts\")\n .entry(\"cli\", \"src/cli.ts\")\n .build();\n return this.library(library);\n }\n\n /**\n * Constructs the config to be for testing.\n */\n public test(\n options: TestConfig = new ZViteTestBuilder().node().istanbul().build(),\n ) {\n this.config.test = options;\n return this;\n }\n\n /**\n * Returns the currently built config.\n *\n * @returns\n * The currently built config.\n */\n public build() {\n return cloneDeep(this.config);\n }\n}\n"],"names":["ZViteLibraryBuilder","entry","name","path","library","cloneDeep","_define_property","formats","ZViteTestBuilder","environment","test","coverage","provider","node","bind","browser","v8","istanbul","testTimeout","all","undefined","ZViteConfigBuilder","options","index","build","config","lib","minify","sourcemap","plugins","externalizeDeps","dtsPlugin","compilerOptions","paths","_dirname","swc","vite","tsConfigPaths"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;AAEC,IACM,MAAMA,mBAAAA,CAAAA;AAMX;;;;;;;;;;AAUC,MACD,KAAOC,CAAMC,IAAY,EAAEC,IAAY,EAAE;QACvC,IAAI,CAACC,OAAO,CAACH,KAAK,GAAG,wCACf,IAAI,CAACG,OAAO,CAACH,KAAK,CAAA,EAAA;AACtB,YAAA,CAACC,OAAOC;;AAEV,QAAA,OAAO,IAAI;AACb;AAEA;;;;;;AAMC,MACD,KAAe,GAAA;AACb,QAAA,OAAO,IAAI,CAACF,KAAK,CAAC,OAAS,EAAA,gBAAA,CAAA;AAC7B;AAEA;;;;;AAKC,MACD,KAAe,GAAA;QACb,OAAOI,SAAAA,CAAU,IAAI,CAACD,OAAO,CAAA;AAC/B;;AA3CA,QAAAE,kBAAA,CAAA,IAAA,EAAQF,SAA0B,EAAA;AACh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OAAOjB,SAAAA,CAAU,IAAI,CAACoB,MAAM,CAAA;AAC9B;AAvGA;;;;;;MAOA,WAAA,CAAmB,QAAwB,CAAE;;AAT7C,QAAA,gBAAA,CAAA,IAAA,EAAQA,UAAR,MAAA,CAAA;aAS2BS,QAAAA,GAAAA,QAAAA;QACzB,IAAI,CAACT,MAAM,GAAG;YACZD,KAAO,EAAA;gBACLG,MAAQ,EAAA,IAAA;gBACRC,SAAW,EAAA;AACb,aAAA;YACAC,OAAS,EAAA;AAACM,gBAAAA,GAAAA,CAAIC,IAAI,EAAA;AAAIC,gBAAAA,aAAAA;AAAgB;AACxC,SAAA;AACF;AAyFF;;;;"}
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "@zthun/janitor-build-config",
3
+ "version": "19.0.0",
4
+ "description": "A shared configuration for builds that create websites, apis, and tests",
5
+ "type": "module",
6
+ "types": "./dist/index.d.mts",
7
+ "main": "./dist/index.cjs",
8
+ "module": "./dist/index.js",
9
+ "exports": {
10
+ "./vite": {
11
+ "types": "./dist/vite/index.d.ts",
12
+ "require": "./dist/vite.cjs",
13
+ "import": "./dist/vite.js"
14
+ },
15
+ "./typedoc": {
16
+ "types": "./dist/typedoc/index.d.ts",
17
+ "require": "./dist/typedoc.cjs",
18
+ "import": "./dist/typedoc.js"
19
+ }
20
+ },
21
+ "scripts": {
22
+ "build": "vite build"
23
+ },
24
+ "license": "MIT",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/zthun/janitor",
28
+ "directory": "packages/janitor-lint-config"
29
+ },
30
+ "files": [
31
+ "dist"
32
+ ],
33
+ "dependencies": {
34
+ "@swc/core": "^1.11.29",
35
+ "lodash-es": "^4.17.21",
36
+ "typedoc": "^0.28.5",
37
+ "unplugin-swc": "^1.5.3",
38
+ "vite": "^6.3.5",
39
+ "vite-plugin-dts": "^4.5.4",
40
+ "vite-plugin-externalize-deps": "^0.9.0",
41
+ "vite-tsconfig-paths": "^5.1.4",
42
+ "vitest": "^3.1.4"
43
+ },
44
+ "devDependencies": {
45
+ "typescript": "~5.8.3"
46
+ },
47
+ "peerDependencies": {
48
+ "vite": ">=6.0.0 <7.0.0",
49
+ "vitest": ">=3.0.0 <4.0.0"
50
+ },
51
+ "peerDependenciesMeta": {
52
+ "vite": {
53
+ "optional": true
54
+ },
55
+ "vitest": {
56
+ "optional": true
57
+ }
58
+ },
59
+ "publishConfig": {
60
+ "access": "public"
61
+ },
62
+ "author": "Anthony Bonta",
63
+ "gitHead": "8277288093dff6023427448ccf903d83912865b5"
64
+ }