@breadstone-infrastructure/vite 0.0.12-beta.1
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/Index.d.ts +5 -0
- package/Index.d.ts.map +1 -0
- package/Index.js +3 -0
- package/Index.js.map +1 -0
- package/LICENSE +21 -0
- package/Plugins/LiveReload.d.ts +30 -0
- package/Plugins/LiveReload.d.ts.map +1 -0
- package/Plugins/LiveReload.js +45 -0
- package/Plugins/LiveReload.js.map +1 -0
- package/Plugins/StaticContent.d.ts +28 -0
- package/Plugins/StaticContent.d.ts.map +1 -0
- package/Plugins/StaticContent.js +160 -0
- package/Plugins/StaticContent.js.map +1 -0
- package/package.json +31 -0
package/Index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { IStaticContentPluginOptions } from './Plugins/StaticContent.js';
|
|
2
|
+
export { staticContentPlugin } from './Plugins/StaticContent.js';
|
|
3
|
+
export type { ILiveReloadPluginOptions as ILiveReloadPluginConfig } from './Plugins/LiveReload.js';
|
|
4
|
+
export { liveReloadPlugin } from './Plugins/LiveReload.js';
|
|
5
|
+
//# sourceMappingURL=Index.d.ts.map
|
package/Index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Index.d.ts","sourceRoot":"","sources":["../src/Index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,YAAY,EAAE,wBAAwB,IAAI,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC"}
|
package/Index.js
ADDED
package/Index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Index.js","sourceRoot":"","sources":["../src/Index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC"}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Breadstone
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Plugin } from 'vite';
|
|
2
|
+
/**
|
|
3
|
+
* Plugin configuration.
|
|
4
|
+
*/
|
|
5
|
+
export interface ILiveReloadPluginOptions {
|
|
6
|
+
/**
|
|
7
|
+
* File paths or glob patterns to watch.
|
|
8
|
+
*/
|
|
9
|
+
paths: string | Array<string>;
|
|
10
|
+
/**
|
|
11
|
+
* Whether the page should be reloaded regardless of which file is modified.
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
alwaysReload?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether to log when a file change triggered a live reload.
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
19
|
+
log?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* File paths will be resolved against this directory.
|
|
22
|
+
* @default ViteDevServer.root
|
|
23
|
+
*/
|
|
24
|
+
root?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Live reload Vite plugin using `FileSystemWatcher`.
|
|
28
|
+
*/
|
|
29
|
+
export declare const liveReloadPlugin: (options: ILiveReloadPluginOptions) => Plugin;
|
|
30
|
+
//# sourceMappingURL=LiveReload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LiveReload.d.ts","sourceRoot":"","sources":["../../src/Plugins/LiveReload.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAC;AAMlD;;GAEG;AACH,MAAM,WAAW,wBAAwB;IAErC;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAE9B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,YAAa,wBAAwB,KAAG,MAoCnE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// #region Imports
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { FileSystemWatcher } from '@breadstone-infrastructure/utilities';
|
|
4
|
+
/**
|
|
5
|
+
* Live reload Vite plugin using `FileSystemWatcher`.
|
|
6
|
+
*/
|
|
7
|
+
export const liveReloadPlugin = (options) => ({
|
|
8
|
+
name: 'vite-plugin-live-reload',
|
|
9
|
+
configureServer({ ws, config: { root: viteRoot, logger } }) {
|
|
10
|
+
const root = options.root ?? viteRoot;
|
|
11
|
+
const logChanges = options.log ?? true;
|
|
12
|
+
const reload = (filePath) => {
|
|
13
|
+
ws.send({
|
|
14
|
+
type: 'full-reload',
|
|
15
|
+
path: options.alwaysReload ? '*' : filePath
|
|
16
|
+
});
|
|
17
|
+
if (logChanges) {
|
|
18
|
+
logger.info(`Page reload ${getShortName(filePath, root)}`, {
|
|
19
|
+
clear: true,
|
|
20
|
+
timestamp: true
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const watcher = new FileSystemWatcher({
|
|
25
|
+
path: root,
|
|
26
|
+
includeSubdirectories: true,
|
|
27
|
+
filter: options.paths
|
|
28
|
+
});
|
|
29
|
+
watcher.on('created', reload);
|
|
30
|
+
watcher.on('changed', reload);
|
|
31
|
+
watcher.on('deleted', reload);
|
|
32
|
+
watcher.start();
|
|
33
|
+
ws.on('close', () => watcher.stop());
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
/**
|
|
37
|
+
* Get the short name of the file relative to the root directory.
|
|
38
|
+
* @param file - The file path.
|
|
39
|
+
* @param root - The root directory.
|
|
40
|
+
* @returns The relative file path.
|
|
41
|
+
*/
|
|
42
|
+
function getShortName(file, root) {
|
|
43
|
+
return file.startsWith(`${root}/`) ? path.posix.relative(root, file) : file;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=LiveReload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LiveReload.js","sourceRoot":"","sources":["../../src/Plugins/LiveReload.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAGlB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAiCzE;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA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AAS,YAAY,CAAC,IAAY,EAAE,IAAY;IAC5C,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAChF,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type Plugin } from 'vite';
|
|
2
|
+
export declare const VIRTUAL_MODULE_KEY = "virtual:static-content";
|
|
3
|
+
export interface IStaticContentPluginOptions {
|
|
4
|
+
/**
|
|
5
|
+
* The current working directory.
|
|
6
|
+
*/
|
|
7
|
+
cwd?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Directory containing markdown files.
|
|
10
|
+
*/
|
|
11
|
+
paths: string | Array<string>;
|
|
12
|
+
/**
|
|
13
|
+
* Optional prefix for component selectors.
|
|
14
|
+
*/
|
|
15
|
+
prefix?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Optional function to transform paths to URLs.
|
|
18
|
+
*/
|
|
19
|
+
pathTransform?: (path: string) => string;
|
|
20
|
+
verbose?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Vite plugin to process Markdown files and expose a component registry, including subfolders.
|
|
24
|
+
*
|
|
25
|
+
* To debug/view the generated components, navigate to `http://localhost:8080/@id/virtual:static-content`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function staticContentPlugin(options: IStaticContentPluginOptions): Plugin;
|
|
28
|
+
//# sourceMappingURL=StaticContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StaticContent.d.ts","sourceRoot":"","sources":["../../src/Plugins/StaticContent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,KAAK,MAAM,EAAoC,MAAM,MAAM,CAAC;AAKlF,eAAO,MAAM,kBAAkB,2BAA2B,CAAC;AAE3D,MAAM,WAAW,2BAA2B;IAExC;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAE9B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAEzC,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,2BAA2B,GAAG,MAAM,CAsGhF"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
// #region Imports
|
|
2
|
+
import { Path, File } from '@breadstone-infrastructure/utilities';
|
|
3
|
+
import { createLogger } from 'vite';
|
|
4
|
+
import matter from 'gray-matter';
|
|
5
|
+
// #endregion
|
|
6
|
+
export const VIRTUAL_MODULE_KEY = 'virtual:static-content';
|
|
7
|
+
/**
|
|
8
|
+
* Vite plugin to process Markdown files and expose a component registry, including subfolders.
|
|
9
|
+
*
|
|
10
|
+
* To debug/view the generated components, navigate to `http://localhost:8080/@id/virtual:static-content`.
|
|
11
|
+
*/
|
|
12
|
+
export function staticContentPlugin(options) {
|
|
13
|
+
const logger = createLogger();
|
|
14
|
+
return {
|
|
15
|
+
name: 'vite-plugin-ststic-content',
|
|
16
|
+
handleHotUpdate({ file, server }) {
|
|
17
|
+
if (file.endsWith('.md')) {
|
|
18
|
+
server.ws.send({ type: 'full-reload' });
|
|
19
|
+
console.log(`[vite-plugin-static-content] File updated: ${file}`);
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
resolveId(source) {
|
|
23
|
+
if (source === VIRTUAL_MODULE_KEY) {
|
|
24
|
+
return source;
|
|
25
|
+
}
|
|
26
|
+
return null;
|
|
27
|
+
},
|
|
28
|
+
load(id) {
|
|
29
|
+
if (id === VIRTUAL_MODULE_KEY) {
|
|
30
|
+
const mdFiles = Path.glob(options.paths)
|
|
31
|
+
.filter((file) => file.endsWith('.md'));
|
|
32
|
+
const sharedImports = `
|
|
33
|
+
import { html, LitElement } from 'lit';
|
|
34
|
+
import { customElement } from 'lit/decorators.js';
|
|
35
|
+
`;
|
|
36
|
+
let componentsRegistry = 'const components = new Map();';
|
|
37
|
+
const components = mdFiles.map((x, i) => {
|
|
38
|
+
const cwd = options.cwd ?? process.cwd();
|
|
39
|
+
const relativeFilePath = Path.relative(cwd, x);
|
|
40
|
+
const componentName = generateComponentName(relativeFilePath, options.prefix ?? '', logger, options);
|
|
41
|
+
const content = File.readAllText(relativeFilePath, 'utf-8');
|
|
42
|
+
const meta = tryGetContentMeta(content, logger, options);
|
|
43
|
+
const routePath = options.pathTransform
|
|
44
|
+
? options.pathTransform(relativeFilePath)
|
|
45
|
+
: relativeFilePath.replace(/\\/g, '/').replace(/\.md$/, '');
|
|
46
|
+
const displayName = generateDisplayName(Path.getFileName(relativeFilePath));
|
|
47
|
+
const breadcrumbParts = routePath.split('/');
|
|
48
|
+
const breadcrumbHtml = breadcrumbParts.map((part, idx) => {
|
|
49
|
+
const href = `/${breadcrumbParts.slice(0, idx + 1).join('/')}`;
|
|
50
|
+
const label = generateDisplayName(part);
|
|
51
|
+
return `<mosaik-breadcrumb-item ${idx === breadcrumbParts.length - 1 ? 'isActive' : ''}>
|
|
52
|
+
<mosaik-button href="${href}" label="${label}"></mosaik-button>
|
|
53
|
+
</mosaik-breadcrumb-item>`;
|
|
54
|
+
})
|
|
55
|
+
.join('');
|
|
56
|
+
const componentCode = `
|
|
57
|
+
class MarkdownComponent${i} extends LitElement {
|
|
58
|
+
render() {
|
|
59
|
+
return html\`
|
|
60
|
+
<mosaik-page breakpoint="md">
|
|
61
|
+
<mosaik-page-pre-header inset="all">
|
|
62
|
+
<mosaik-breadcrumb wrap="true">
|
|
63
|
+
<mosaik-breadcrumb-item>
|
|
64
|
+
<mosaik-button href="/docs" label="Docs"></mosaik-button>
|
|
65
|
+
</mosaik-breadcrumb-item>
|
|
66
|
+
${breadcrumbHtml}
|
|
67
|
+
</mosaik-breadcrumb>
|
|
68
|
+
</mosaik-page-pre-header>
|
|
69
|
+
<mosaik-page-content>
|
|
70
|
+
<app-markdown text="${escapeStringForTemplate(content)}" breaks="true"></app-markdown>
|
|
71
|
+
</mosaik-page-content>
|
|
72
|
+
</mosaik-page>
|
|
73
|
+
\`;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
customElements.define('${componentName}', MarkdownComponent${i});
|
|
78
|
+
`;
|
|
79
|
+
componentsRegistry += `
|
|
80
|
+
components.set('${componentName}', {
|
|
81
|
+
name: 'MarkdownComponent${i}',
|
|
82
|
+
displayName: '${typeof meta.title === 'string' ? meta.title : displayName}',
|
|
83
|
+
path: '${typeof meta.route === 'string' ? meta.route : `/${routePath}`}',
|
|
84
|
+
selector: '${componentName}'
|
|
85
|
+
});
|
|
86
|
+
`;
|
|
87
|
+
return componentCode;
|
|
88
|
+
})
|
|
89
|
+
.join('\n');
|
|
90
|
+
return `
|
|
91
|
+
${sharedImports}
|
|
92
|
+
${componentsRegistry}
|
|
93
|
+
${components}
|
|
94
|
+
export default components;
|
|
95
|
+
`;
|
|
96
|
+
}
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Generates a valid Lit component name, applying an optional prefix.
|
|
103
|
+
*
|
|
104
|
+
* @param fileName - The file name of the Markdown file
|
|
105
|
+
* @param prefix - An optional prefix for the component selector
|
|
106
|
+
* @returns A valid component selector name.
|
|
107
|
+
*/
|
|
108
|
+
function generateComponentName(fileName, prefix, logger, options) {
|
|
109
|
+
if (options.verbose) {
|
|
110
|
+
logger.info(`Generating component name for file: ${fileName}`);
|
|
111
|
+
}
|
|
112
|
+
const baseName = fileName
|
|
113
|
+
.replace(/-md$/, '-doc') // Replace `.md` with `-doc`
|
|
114
|
+
.replace(/^(\.\.\/)+/, '') // Remove relative path indicators
|
|
115
|
+
.replace(/[^a-zA-Z0-9]/g, '-') // Replace unsupported characters with dashes
|
|
116
|
+
.toLowerCase();
|
|
117
|
+
if (options.verbose) {
|
|
118
|
+
logger.info(`Generated component name: ${prefix}${baseName}`);
|
|
119
|
+
}
|
|
120
|
+
return `${prefix}${baseName}`;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Escapes special characters in a string to make it TypeScript string-safe.
|
|
124
|
+
*
|
|
125
|
+
* @param content - The string content to escape.
|
|
126
|
+
* @returns The escaped string.
|
|
127
|
+
*/
|
|
128
|
+
function escapeStringForTemplate(content) {
|
|
129
|
+
return content
|
|
130
|
+
.replace(/\\/g, '\\\\') // Escape backslashes
|
|
131
|
+
.replace(/`/g, '\\`') // Escape backticks
|
|
132
|
+
.replace(/\${/g, '\\${'); // Escape ${ to prevent interpolation
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Converts a file or folder name to a user-friendly display name.
|
|
136
|
+
*
|
|
137
|
+
* @param segment - The file or folder name to convert.
|
|
138
|
+
* @returns A user-friendly display name.
|
|
139
|
+
*/
|
|
140
|
+
function generateDisplayName(segment) {
|
|
141
|
+
return segment
|
|
142
|
+
.replace(/-/g, ' ') // Replace dashes with spaces
|
|
143
|
+
.replace(/_/g, ' ') // Replace underscores with spaces
|
|
144
|
+
.replace(/\.[^/.]+$/, '') // Remove file extensions
|
|
145
|
+
.replace(/\b\w/g, (char) => char.toUpperCase()); // Capitalize the first letter of each word
|
|
146
|
+
}
|
|
147
|
+
function tryGetContentMeta(content, logger, options) {
|
|
148
|
+
try {
|
|
149
|
+
const parsed = matter(content);
|
|
150
|
+
if (options.verbose) {
|
|
151
|
+
logger.info(`Parsed content meta: ${JSON.stringify(parsed.data)}`);
|
|
152
|
+
}
|
|
153
|
+
return parsed.data;
|
|
154
|
+
}
|
|
155
|
+
catch (error) {
|
|
156
|
+
logger.error(`Failed to parse content meta: ${String(error)}`);
|
|
157
|
+
return {};
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=StaticContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StaticContent.js","sourceRoot":"","sources":["../../src/Plugins/StaticContent.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAElB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAgD,YAAY,EAAE,MAAM,MAAM,CAAC;AAClF,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,aAAa;AAEb,MAAM,CAAC,MAAM,kBAAkB,GAAG,wBAAwB,CAAC;AA2B3D;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAoC;IACpE,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAE9B,OAAO;QACH,IAAI,EAAE,4BAA4B;QAElC,eAAe,CAAC,EAAE,IAAI,EAAE,MAAM,EAG7B;YACG,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;gBACvB,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC;gBACxC,OAAO,CAAC,GAAG,CAAC,8CAA8C,IAAI,EAAE,CAAC,CAAC;YACtE,CAAC;QACL,CAAC;QAED,SAAS,CAAC,MAAc;YACpB,IAAI,MAAM,KAAK,kBAAkB,EAAE,CAAC;gBAChC,OAAO,MAAM,CAAC;YAClB,CAAC;YACD,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,IAAI,CAAC,EAAU;YACX,IAAI,EAAE,KAAK,kBAAkB,EAAE,CAAC;gBAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;qBACnC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;gBAE5C,MAAM,aAAa,GAAG;;;iBAGrB,CAAC;gBAEF,IAAI,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AAC,KAAK,CAAC,iCAAiC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC/D,OAAO,EAAE,CAAC;IACd,CAAC;AACL,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@breadstone-infrastructure/vite",
|
|
3
|
+
"description": "Vite configuration and plugins",
|
|
4
|
+
"version": "0.0.12-beta.1",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "andre.wehlert <awehlert@breadstone.de> (https://www.breadstone.de)",
|
|
7
|
+
"repository": {
|
|
8
|
+
"url": "git+ssh://git@github.com/RueDeRennes/mosaik.git"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"main": "./Index.js",
|
|
12
|
+
"commonjs": "./Index.js",
|
|
13
|
+
"module": "./Index.js",
|
|
14
|
+
"types": "./Index.d.ts",
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@breadstone-infrastructure/utilities": "^0.0.12-beta.1",
|
|
17
|
+
"@breadstone-tools/markdowner-core": "^0.0.12-beta.1",
|
|
18
|
+
"gray-matter": "^4.0.3"
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"vite": "^4.0.0 || ^5.0.0 || ^6.0.0"
|
|
22
|
+
},
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"import": "./dist/Index.js"
|
|
26
|
+
},
|
|
27
|
+
"./types": {
|
|
28
|
+
"import": "./dist/Index.d.ts"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|