@soubiran/vite 0.3.1 → 0.5.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 +243 -0
- package/dist/index.d.mts +7 -0
- package/dist/{vite.config.mjs → index.mjs} +467 -447
- package/dist/types-DznJAci_.d.mts +36 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.mjs +1 -0
- package/dist/utils-DYsc-HAW.mjs +21 -0
- package/dist/utils.mjs +2 -0
- package/package.json +29 -25
- package/dist/src/utils.mjs +0 -3
- package/dist/utils-CgX7pSaU.mjs +0 -12
- package/dist/vite.config.d.mts +0 -79
- /package/dist/{src/utils.d.mts → utils.d.mts} +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Options } from "unplugin-vue-markdown/types";
|
|
2
|
+
|
|
3
|
+
//#region src/markdown/assert.d.ts
|
|
4
|
+
type AssertFn = (id: string, frontmatter: Record<string, any>) => void;
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/markdown/structured-data/schemas/types.d.ts
|
|
7
|
+
interface BreadcrumbItem {
|
|
8
|
+
title: string;
|
|
9
|
+
type?: 'WebSite' | 'WebPage';
|
|
10
|
+
url?: string;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/markdown/structured-data/types.d.ts
|
|
14
|
+
interface StructuredDataPageConfig {
|
|
15
|
+
type: 'article' | 'collection' | 'default';
|
|
16
|
+
breadcrumbItems?: BreadcrumbItem[];
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/types.d.ts
|
|
20
|
+
interface Options$1 {
|
|
21
|
+
extractPage: (id: string) => string | null;
|
|
22
|
+
markdown?: Options;
|
|
23
|
+
seo?: {
|
|
24
|
+
assert?: {
|
|
25
|
+
rules?: AssertFn;
|
|
26
|
+
};
|
|
27
|
+
structuredData?: {
|
|
28
|
+
pageConfig?: (page: string | null, frontmatter: Record<string, any>) => StructuredDataPageConfig;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
api?: {
|
|
32
|
+
categories?: string[];
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { StructuredDataPageConfig as n, BreadcrumbItem as r, Options$1 as t };
|
package/dist/types.d.mts
ADDED
package/dist/types.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { joinURL, withoutTrailingSlash } from "ufo";
|
|
2
|
+
//#region src/constants.ts
|
|
3
|
+
const markdownExtensionRE = /\.md$/;
|
|
4
|
+
const vueExtensionRE = /\.vue$/;
|
|
5
|
+
const indexSuffixRE = /index$/;
|
|
6
|
+
const vueIncludePatterns = [vueExtensionRE, markdownExtensionRE];
|
|
7
|
+
const componentIncludePatterns = [
|
|
8
|
+
vueExtensionRE,
|
|
9
|
+
/\.vue\?vue/,
|
|
10
|
+
markdownExtensionRE
|
|
11
|
+
];
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/utils.ts
|
|
14
|
+
function getUri(id) {
|
|
15
|
+
return withoutTrailingSlash(id.split("/pages/")[1].replace(markdownExtensionRE, "").replace(vueExtensionRE, "").replace(indexSuffixRE, ""));
|
|
16
|
+
}
|
|
17
|
+
function toUrl(hostname, ...paths) {
|
|
18
|
+
return joinURL(`https://${hostname}`, ...paths);
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { vueIncludePatterns as a, markdownExtensionRE as i, toUrl as n, componentIncludePatterns as r, getUri as t };
|
package/dist/utils.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soubiran/vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"author": "Estéban Soubiran <esteban@soubiran.dev>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://github.com/sponsors/Barbapapazes",
|
|
@@ -13,55 +13,59 @@
|
|
|
13
13
|
"bugs": "https://github.com/Barbapapazes/.soubiran.dev/issues",
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
|
-
"types": "./dist/
|
|
17
|
-
"import": "./dist/
|
|
16
|
+
"types": "./dist/index.d.mts",
|
|
17
|
+
"import": "./dist/index.mjs"
|
|
18
18
|
},
|
|
19
19
|
"./utils": {
|
|
20
|
-
"types": "./dist/
|
|
21
|
-
"import": "./dist/
|
|
20
|
+
"types": "./dist/utils.d.mts",
|
|
21
|
+
"import": "./dist/utils.mjs"
|
|
22
|
+
},
|
|
23
|
+
"./types": {
|
|
24
|
+
"types": "./dist/types.d.mts",
|
|
25
|
+
"import": "./dist/types.mjs"
|
|
22
26
|
}
|
|
23
27
|
},
|
|
24
|
-
"main": "dist/
|
|
25
|
-
"types": "dist/
|
|
28
|
+
"main": "dist/index.mjs",
|
|
29
|
+
"types": "dist/index.d.mts",
|
|
26
30
|
"files": [
|
|
27
31
|
"dist"
|
|
28
32
|
],
|
|
29
33
|
"dependencies": {
|
|
30
|
-
"@nuxt/ui": "
|
|
31
|
-
"@shikijs/markdown-it": "^
|
|
34
|
+
"@nuxt/ui": "4.5.0",
|
|
35
|
+
"@shikijs/markdown-it": "^4.0.2",
|
|
32
36
|
"@types/fs-extra": "^11.0.4",
|
|
33
37
|
"@types/markdown-it": "^14.1.2",
|
|
34
38
|
"@types/markdown-it-link-attributes": "^3.0.5",
|
|
35
|
-
"@types/node": "^24.
|
|
36
|
-
"@unhead/vue": "^2.
|
|
39
|
+
"@types/node": "^24.12.0",
|
|
40
|
+
"@unhead/vue": "^2.1.12",
|
|
37
41
|
"@unpic/placeholder": "^0.1.2",
|
|
38
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
42
|
+
"@vitejs/plugin-vue": "^6.0.5",
|
|
39
43
|
"ansis": "^4.2.0",
|
|
40
|
-
"fs-extra": "^11.3.
|
|
44
|
+
"fs-extra": "^11.3.4",
|
|
41
45
|
"gray-matter": "^4.0.3",
|
|
42
|
-
"markdown-it": "^14.1.
|
|
46
|
+
"markdown-it": "^14.1.1",
|
|
43
47
|
"markdown-it-async": "^2.2.0",
|
|
44
|
-
"markdown-it-github-alerts": "^1.0.
|
|
48
|
+
"markdown-it-github-alerts": "^1.0.1",
|
|
45
49
|
"markdown-it-image-figures": "^2.1.1",
|
|
46
50
|
"markdown-it-link-attributes": "^4.0.1",
|
|
47
51
|
"markdown-it-table-of-contents": "^1.1.0",
|
|
48
52
|
"sharp": "^0.34.5",
|
|
49
|
-
"shiki": "^
|
|
50
|
-
"sitemap": "^
|
|
53
|
+
"shiki": "^4.0.2",
|
|
54
|
+
"sitemap": "^9.0.1",
|
|
51
55
|
"typescript": "^5.9.3",
|
|
52
|
-
"ufo": "^1.6.
|
|
53
|
-
"unhead": "^2.
|
|
56
|
+
"ufo": "^1.6.3",
|
|
57
|
+
"unhead": "^2.1.12",
|
|
54
58
|
"unplugin-fonts": "^1.4.0",
|
|
55
|
-
"unplugin-icons": "^
|
|
56
|
-
"unplugin-vue-markdown": "^
|
|
59
|
+
"unplugin-icons": "^23.0.1",
|
|
60
|
+
"unplugin-vue-markdown": "^30.0.0",
|
|
57
61
|
"unplugin-vue-router": "^0.16.2",
|
|
58
|
-
"vite": "
|
|
59
|
-
"vite-ssg": "^28.
|
|
62
|
+
"vite": "^8.0.1",
|
|
63
|
+
"vite-ssg": "^28.3.0",
|
|
60
64
|
"vue-router": "^4.6.3",
|
|
61
|
-
"@soubiran/ui": "0.
|
|
65
|
+
"@soubiran/ui": "0.5.0"
|
|
62
66
|
},
|
|
63
67
|
"devDependencies": {
|
|
64
|
-
"tsdown": "^0.
|
|
68
|
+
"tsdown": "^0.21.4"
|
|
65
69
|
},
|
|
66
70
|
"scripts": {
|
|
67
71
|
"build": "tsdown"
|
package/dist/src/utils.mjs
DELETED
package/dist/utils-CgX7pSaU.mjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { joinURL, withoutTrailingSlash } from "ufo";
|
|
2
|
-
|
|
3
|
-
//#region src/utils.ts
|
|
4
|
-
function getUri(id) {
|
|
5
|
-
return withoutTrailingSlash(id.split("/pages/")[1].replace(/\.md$/, "").replace(/\.vue$/, "").replace(/index$/, ""));
|
|
6
|
-
}
|
|
7
|
-
function toUrl(hostname, ...paths) {
|
|
8
|
-
return joinURL(`https://${hostname}`, ...paths);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
//#endregion
|
|
12
|
-
export { toUrl as n, getUri as t };
|
package/dist/vite.config.d.mts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { UserConfig } from "vite";
|
|
2
|
-
import { Options } from "unplugin-vue-markdown/types";
|
|
3
|
-
|
|
4
|
-
//#region src/assert.d.ts
|
|
5
|
-
type AssertFn = (id: string, frontmatter: Record<string, any>) => void;
|
|
6
|
-
//#endregion
|
|
7
|
-
//#region src/structured-data/breadcrumb.d.ts
|
|
8
|
-
|
|
9
|
-
interface BreadcrumbItem {
|
|
10
|
-
title: string;
|
|
11
|
-
type?: 'WebSite' | 'WebPage';
|
|
12
|
-
url?: string;
|
|
13
|
-
}
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/structured-data/person.d.ts
|
|
16
|
-
interface PersonOptions {
|
|
17
|
-
name: string;
|
|
18
|
-
sameAs: string[];
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/structured-data/index.d.ts
|
|
22
|
-
interface StructuredDataPageConfig {
|
|
23
|
-
type: 'article' | 'collection' | 'default';
|
|
24
|
-
breadcrumbItems?: BreadcrumbItem[];
|
|
25
|
-
}
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region vite.config.d.ts
|
|
28
|
-
/**
|
|
29
|
-
* Main configuration interface for the infrastructure status app.
|
|
30
|
-
*/
|
|
31
|
-
interface Options$1 {
|
|
32
|
-
/**
|
|
33
|
-
* Extracts the page identifier from a given file path or id.
|
|
34
|
-
* @param id - The file path or identifier.
|
|
35
|
-
* @returns The extracted page name, or null if not found.
|
|
36
|
-
*/
|
|
37
|
-
extractPage: (id: string) => string | null;
|
|
38
|
-
/**
|
|
39
|
-
* Markdown rendering options for unplugin-vue-markdown.
|
|
40
|
-
*/
|
|
41
|
-
markdown?: Options;
|
|
42
|
-
/**
|
|
43
|
-
* SEO and structured data configuration.
|
|
44
|
-
*/
|
|
45
|
-
seo?: {
|
|
46
|
-
/**
|
|
47
|
-
* Person information for Schema.org structured data.
|
|
48
|
-
*/
|
|
49
|
-
person?: PersonOptions;
|
|
50
|
-
/**
|
|
51
|
-
* Custom validation rules for frontmatter fields.
|
|
52
|
-
*/
|
|
53
|
-
assert?: {
|
|
54
|
-
/**
|
|
55
|
-
* Validation rules function for frontmatter.
|
|
56
|
-
*/
|
|
57
|
-
rules?: AssertFn;
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* Structured data generation configuration.
|
|
61
|
-
*/
|
|
62
|
-
structuredData?: {
|
|
63
|
-
/**
|
|
64
|
-
* Callback to determine page type and configuration for structured data generation.
|
|
65
|
-
* @param page - The page name or null.
|
|
66
|
-
* @param frontmatter - The frontmatter data for the page.
|
|
67
|
-
* @returns Structured data configuration for the page.
|
|
68
|
-
*/
|
|
69
|
-
pageConfig?: (page: string | null, frontmatter: Record<string, any>) => StructuredDataPageConfig;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* Categories to generate API JSON files for (e.g., ['websites', 'platforms']).
|
|
74
|
-
*/
|
|
75
|
-
apiCategories?: string[];
|
|
76
|
-
}
|
|
77
|
-
declare const _default: (title: string, hostname: string, options: Options$1, config?: UserConfig) => Record<string, any>;
|
|
78
|
-
//#endregion
|
|
79
|
-
export { type BreadcrumbItem, type PersonOptions, type StructuredDataPageConfig, _default as default };
|
|
File without changes
|