@vixt/core 0.1.6 → 0.1.8
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/index.mjs +6 -2
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -151,7 +151,9 @@ function resolveHeadTag(tag, attrs) {
|
|
|
151
151
|
}
|
|
152
152
|
function generateIndexHtml(options, vixt) {
|
|
153
153
|
const { buildDir, rootDir } = vixt.options;
|
|
154
|
-
|
|
154
|
+
const indexHtmlPath = path.resolve(rootDir, "index.html");
|
|
155
|
+
if (!fs.existsSync(indexHtmlPath))
|
|
156
|
+
fs.outputFileSync(indexHtmlPath, `<!-- Generated by Vixt -->
|
|
155
157
|
<!-- This file transform from '${buildDir}/index.html' -->
|
|
156
158
|
`);
|
|
157
159
|
const { head = {}, rootTag, rootId } = options;
|
|
@@ -186,7 +188,9 @@ ${noscriptTemplate}
|
|
|
186
188
|
}
|
|
187
189
|
function generateMainTs(options, vixt) {
|
|
188
190
|
const { buildDir, rootDir } = vixt.options;
|
|
189
|
-
|
|
191
|
+
const mainTsPath = path.resolve(rootDir, "src", "main.ts");
|
|
192
|
+
if (!fs.existsSync(mainTsPath))
|
|
193
|
+
fs.outputFileSync(mainTsPath, `// Generated by Vixt
|
|
190
194
|
// This file transform from '${buildDir}/main.ts'
|
|
191
195
|
`);
|
|
192
196
|
const cssTemplate = options?.css?.map((css) => `import '${css}'`).join("\n") ?? "";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vixt/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.8",
|
|
5
5
|
"author": "SoulLyoko<https://github.com/SoulLyoko>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/SoulLyoko/vixt#readme",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"mlly": "1.7.1",
|
|
31
31
|
"pathe": "^1.1.2",
|
|
32
32
|
"pkg-types": "^1.1.3",
|
|
33
|
-
"tsx": "^4.16.
|
|
34
|
-
"vite": "^5.3.
|
|
35
|
-
"vite-plugin-checker": "^0.7.
|
|
36
|
-
"vue-tsc": "^2.0.
|
|
33
|
+
"tsx": "^4.16.5",
|
|
34
|
+
"vite": "^5.3.5",
|
|
35
|
+
"vite-plugin-checker": "^0.7.2",
|
|
36
|
+
"vue-tsc": "^2.0.29"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "unbuild"
|