create-rue 0.0.16 → 0.1.2
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/bundle.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/*! create-rue v0.
|
|
2
|
+
/*! create-rue v0.1.2 | MIT */
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
import "node:fs";
|
|
@@ -2037,7 +2037,7 @@ function inferPackageManager() {
|
|
|
2037
2037
|
//#endregion
|
|
2038
2038
|
//#region package.json
|
|
2039
2039
|
var name = "create-rue";
|
|
2040
|
-
var version = "0.
|
|
2040
|
+
var version = "0.1.2";
|
|
2041
2041
|
//#endregion
|
|
2042
2042
|
//#region index.ts
|
|
2043
2043
|
const language = await getLanguage(fileURLToPath(new URL("./locales", import.meta.url)));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-rue",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "🛠️ The
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "🛠️ The will to start a Vite-powered Rue project",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"homepage": "https://github.com/hunzhiwange/create-rue#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -93,7 +93,8 @@ const getHeaderStorageKey = (path: string) => {
|
|
|
93
93
|
return `rue.base.header.hide.${path.replace(/^\//, '')}`
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
const getStoredHeaderHidden = (path: string) =>
|
|
96
|
+
const getStoredHeaderHidden = (path: string) =>
|
|
97
|
+
localStorage.getItem(getHeaderStorageKey(path)) === '1'
|
|
97
98
|
|
|
98
99
|
const applyTheme = (theme: string) => {
|
|
99
100
|
document.documentElement.setAttribute('data-theme', theme)
|
|
@@ -299,7 +300,10 @@ const SiteLayout: FC = (props) => {
|
|
|
299
300
|
return
|
|
300
301
|
}
|
|
301
302
|
|
|
302
|
-
localStorage.setItem(
|
|
303
|
+
localStorage.setItem(
|
|
304
|
+
getHeaderStorageKey(currentPath.get()),
|
|
305
|
+
reportHeaderHidden.value ? '1' : '0',
|
|
306
|
+
)
|
|
303
307
|
},
|
|
304
308
|
)
|
|
305
309
|
|
|
@@ -315,9 +319,7 @@ const SiteLayout: FC = (props) => {
|
|
|
315
319
|
}}
|
|
316
320
|
/>
|
|
317
321
|
)}
|
|
318
|
-
<main className="content-width pb-10 pt-6 sm:pt-8">
|
|
319
|
-
{props.children}
|
|
320
|
-
</main>
|
|
322
|
+
<main className="content-width pb-10 pt-6 sm:pt-8">{props.children}</main>
|
|
321
323
|
{!hideHeader.get() && <Footer />}
|
|
322
324
|
</div>
|
|
323
325
|
</div>
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite",
|
|
8
8
|
"build": "vite build",
|
|
9
|
+
"preview": "vite preview",
|
|
9
10
|
"typecheck": "tsgo --noEmit",
|
|
10
11
|
"oxlint": "oxlint -c ./.oxlintrc.json .",
|
|
11
12
|
"oxlint-fix": "oxlint -c ./.oxlintrc.json . --fix",
|
|
@@ -13,18 +14,18 @@
|
|
|
13
14
|
"format-check": "oxfmt --check ."
|
|
14
15
|
},
|
|
15
16
|
"dependencies": {
|
|
16
|
-
"@rue-js/jsx-runtime": "^0.
|
|
17
|
-
"@rue-js/router": "^0.
|
|
18
|
-
"@rue-js/rue": "^0.
|
|
19
|
-
"@rue-js/runtime": "^0.
|
|
20
|
-
"@rue-js/runtime-vapor": "^0.
|
|
17
|
+
"@rue-js/jsx-runtime": "^0.1.1",
|
|
18
|
+
"@rue-js/router": "^0.1.1",
|
|
19
|
+
"@rue-js/rue": "^0.1.1",
|
|
20
|
+
"@rue-js/runtime": "^0.1.1",
|
|
21
|
+
"@rue-js/runtime-vapor": "^0.1.1",
|
|
21
22
|
"daisyui": "^5.5.19",
|
|
22
23
|
"oxfmt": "^0.48.0",
|
|
23
24
|
"oxlint": "^1.63.0"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
|
-
"@rue-js/jsx-dev-runtime": "^0.
|
|
27
|
-
"@rue-js/vite-plugin-rue": "^0.
|
|
27
|
+
"@rue-js/jsx-dev-runtime": "^0.1.1",
|
|
28
|
+
"@rue-js/vite-plugin-rue": "^0.1.1",
|
|
28
29
|
"@swc/core": "^1.15.33",
|
|
29
30
|
"@tailwindcss/typography": "^0.5.19",
|
|
30
31
|
"@tailwindcss/vite": "^4.3.0",
|
|
@@ -3,7 +3,7 @@ import VitePluginRue from '@rue-js/vite-plugin-rue'
|
|
|
3
3
|
import wasm from 'vite-plugin-wasm'
|
|
4
4
|
import tailwindcss from '@tailwindcss/vite'
|
|
5
5
|
|
|
6
|
-
export default defineConfig({
|
|
6
|
+
export default defineConfig(({ command }) => ({
|
|
7
7
|
resolve: {
|
|
8
8
|
conditions: ['import', 'module', 'browser', 'default'],
|
|
9
9
|
},
|
|
@@ -11,8 +11,11 @@ export default defineConfig({
|
|
|
11
11
|
wasm(),
|
|
12
12
|
tailwindcss() as any,
|
|
13
13
|
VitePluginRue({
|
|
14
|
-
|
|
15
|
-
debug: true,
|
|
14
|
+
debug: command === 'serve',
|
|
16
15
|
}),
|
|
17
16
|
],
|
|
18
|
-
|
|
17
|
+
server: {
|
|
18
|
+
port: 5173,
|
|
19
|
+
strictPort: false,
|
|
20
|
+
},
|
|
21
|
+
}))
|