@blinkk/root 1.0.0-alpha.3 → 1.0.0-alpha.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.
@@ -0,0 +1,61 @@
1
+ import { UserConfig } from 'vite';
2
+
3
+ interface RootConfig {
4
+ /**
5
+ * Configuration for auto-injecting custom element dependencies.
6
+ */
7
+ elements?: {
8
+ /**
9
+ * A list of directories to use to look for custom elements. The dir path
10
+ * should be relative to the project dir, e.g. "path/to/elements" or
11
+ * "node_modules/my-package".
12
+ */
13
+ include?: string[];
14
+ };
15
+ /**
16
+ * Configuration options for localization and internationalization.
17
+ */
18
+ i18n?: RootI18nConfig;
19
+ /**
20
+ * Vite configuration.
21
+ * @see {@link https://vitejs.dev/config/} for more information.
22
+ */
23
+ vite?: UserConfig;
24
+ /**
25
+ * Whether to automatically minify HTML output.
26
+ */
27
+ minifyHtml?: boolean;
28
+ /**
29
+ * Whether to include a sitemap.xml file to the build output.
30
+ */
31
+ sitemap?: boolean;
32
+ }
33
+ interface RootI18nConfig {
34
+ /**
35
+ * Locales enabled for the site.
36
+ */
37
+ locales?: string[];
38
+ /**
39
+ * The default locale to use. Defaults is `en`.
40
+ */
41
+ defaultLocale?: string;
42
+ /**
43
+ * URL format for localized content. Default is `/{locale}/{path}`.
44
+ */
45
+ urlFormat?: string;
46
+ }
47
+ declare function defineConfig(config: RootConfig): RootConfig;
48
+
49
+ declare type GetStaticProps<T = unknown> = (ctx: {
50
+ params: Record<string, string>;
51
+ }) => Promise<{
52
+ props: T;
53
+ notFound?: boolean;
54
+ }>;
55
+ declare type GetStaticPaths<T = Record<string, string>> = () => Promise<{
56
+ paths: Array<{
57
+ params: T;
58
+ }>;
59
+ }>;
60
+
61
+ export { GetStaticProps as G, RootConfig as R, RootI18nConfig as a, GetStaticPaths as b, defineConfig as d };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blinkk/root",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.5",
4
4
  "author": "s@blinkk.com",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -60,7 +60,7 @@
60
60
  "preact-custom-element": "^4.2.1",
61
61
  "preact-render-to-string": "^5.2.3",
62
62
  "rollup": "^2.79.0",
63
- "tsup": "^5.12.1",
63
+ "tsup": "^6.2.3",
64
64
  "typescript": "^4.7.4",
65
65
  "vitest": "^0.18.1"
66
66
  },
@@ -1,27 +0,0 @@
1
- import { UserConfig } from 'vite';
2
-
3
- interface RootConfig {
4
- i18n?: RootI18nConfig;
5
- vite?: UserConfig;
6
- sitemap?: boolean;
7
- }
8
- interface RootI18nConfig {
9
- locales?: string[];
10
- defaultLocale?: string;
11
- urlFormat?: string;
12
- }
13
- declare function defineConfig(config: RootConfig): RootConfig;
14
-
15
- declare type GetStaticProps<T = unknown> = (ctx: {
16
- params: Record<string, string>;
17
- }) => Promise<{
18
- props: T;
19
- notFound?: boolean;
20
- }>;
21
- declare type GetStaticPaths<T = Record<string, string>> = () => Promise<{
22
- paths: Array<{
23
- params: T;
24
- }>;
25
- }>;
26
-
27
- export { GetStaticProps as G, RootConfig as R, RootI18nConfig as a, GetStaticPaths as b, defineConfig as d };