zuby 1.0.43 → 1.0.44

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/types.d.ts +33 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zuby",
3
- "version": "1.0.43",
3
+ "version": "1.0.44",
4
4
  "description": "Zuby.js is framework for building SPA apps using Vite",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/types.d.ts CHANGED
@@ -230,16 +230,49 @@ export interface ZubyPlugin extends VitePlugin {
230
230
  buildStep?: Boolean;
231
231
  /**
232
232
  * The Zuby plugin API hooks.
233
+ * Hooks allow you to run custom code at specific points during the build/dev process
234
+ * and modify the internal Zuby config.
233
235
  */
234
236
  hooks?: {
237
+ /**
238
+ * This hook is called before the Zuby config is resolved
239
+ * and allows you to modify the config.
240
+ */
235
241
  'zuby:config:setup'?: (params: ZubyConfigSetupHookParams) => void | Promise<void>;
242
+ /**
243
+ * This hook is called after the Zuby config is resolved by all plugins
244
+ * and allows you to get the final config before the build/dev process starts.
245
+ */
236
246
  'zuby:config:done'?: (params: ZubyConfigDoneHookParams) => void | Promise<void>;
247
+ /**
248
+ * This hook is called before the dev server is started
249
+ * and allows you to modify the server config.
250
+ */
237
251
  'zuby:dev:setup'?: (params: ZubyDevHookParams) => void | Promise<void>;
252
+ /**
253
+ * This hook is called after the dev server is started
254
+ */
238
255
  'zuby:dev:start'?: (params: ZubyDevHookParams) => void | Promise<void>;
256
+ /**
257
+ * This hook is called before the build process starts
258
+ * and allows you to modify the vite build config.
259
+ */
239
260
  'zuby:build:setup'?: (params: ZubyBuildSetupHookParams) => void | Promise<void>;
261
+ /**
262
+ * This hook is called after the build process starts
263
+ */
240
264
  'zuby:build:start'?: (params: ZubyBuildHookParams) => void | Promise<void>;
265
+ /**
266
+ * This hook is called after the client build is done
267
+ */
241
268
  'zuby:build:client:done'?: (params: ZubyBuildHookParams) => void | Promise<void>;
269
+ /**
270
+ * This hook is called after the server build is done
271
+ */
242
272
  'zuby:build:server:done'?: (params: ZubyBuildHookParams) => void | Promise<void>;
273
+ /**
274
+ * This hook is called after the whole build process is done
275
+ */
243
276
  'zuby:build:done'?: (params: ZubyBuildDoneHookParams) => void | Promise<void>;
244
277
  };
245
278
  }