@quincarter/create-lit-app 1.1.6 → 1.2.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/create-app-shell.sh +28 -31
- package/package.json +4 -4
package/create-app-shell.sh
CHANGED
|
@@ -555,19 +555,24 @@ cat <<EOF > package.json
|
|
|
555
555
|
"start": "vite",
|
|
556
556
|
"build": "tsc && vite build",
|
|
557
557
|
"preview": "yarn build && vite preview",
|
|
558
|
-
"test": "vitest run"
|
|
558
|
+
"test": "vitest run",
|
|
559
|
+
"fmt": "oxfmt",
|
|
560
|
+
"fmt:check": "oxfmt --check",
|
|
561
|
+
"lint": "oxlint",
|
|
562
|
+
"lint:fix": "oxlint --fix"
|
|
559
563
|
},
|
|
560
564
|
"dependencies": {
|
|
561
565
|
$DEPS
|
|
562
566
|
},
|
|
563
567
|
"devDependencies": {
|
|
564
|
-
"@
|
|
565
|
-
"@types/luxon": "^3.7.2",
|
|
568
|
+
"@types/luxon": "^3.7.5",
|
|
566
569
|
"@types/mocha": "^10.0.10",
|
|
567
|
-
"
|
|
568
|
-
"
|
|
569
|
-
"
|
|
570
|
-
"
|
|
570
|
+
"oxfmt": "^0.65.0",
|
|
571
|
+
"oxlint": "^1.80.0",
|
|
572
|
+
"typescript": "^7.0.2",
|
|
573
|
+
"vite": "^8.2.2",
|
|
574
|
+
"vite-plugin-pwa": "^1.3.0",
|
|
575
|
+
"vitest": "^4.1.11"
|
|
571
576
|
}
|
|
572
577
|
}
|
|
573
578
|
EOF
|
|
@@ -575,7 +580,7 @@ EOF
|
|
|
575
580
|
# ------------------------------------------------------------------------------
|
|
576
581
|
# Generate Configuration Files
|
|
577
582
|
# ------------------------------------------------------------------------------
|
|
578
|
-
log_info "Generating configuration files (tsconfig.json, vite.config.ts
|
|
583
|
+
log_info "Generating configuration files (tsconfig.json, vite.config.ts)..."
|
|
579
584
|
|
|
580
585
|
cat <<'EOF' > tsconfig.json
|
|
581
586
|
{
|
|
@@ -610,25 +615,6 @@ export default defineConfig({
|
|
|
610
615
|
});
|
|
611
616
|
EOF
|
|
612
617
|
|
|
613
|
-
cat <<'EOF' > biome.json
|
|
614
|
-
{
|
|
615
|
-
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
|
|
616
|
-
"organizeImports": {
|
|
617
|
-
"enabled": true
|
|
618
|
-
},
|
|
619
|
-
"linter": {
|
|
620
|
-
"enabled": true,
|
|
621
|
-
"rules": {
|
|
622
|
-
"recommended": true
|
|
623
|
-
}
|
|
624
|
-
},
|
|
625
|
-
"formatter": {
|
|
626
|
-
"enabled": true,
|
|
627
|
-
"indentStyle": "tab"
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
EOF
|
|
631
|
-
|
|
632
618
|
cat <<'EOF' > .gitignore
|
|
633
619
|
node_modules
|
|
634
620
|
dist
|
|
@@ -699,6 +685,19 @@ cat <<'EOF' > src/vite-env.d.ts
|
|
|
699
685
|
/// <reference types="vite/client" />
|
|
700
686
|
EOF
|
|
701
687
|
|
|
688
|
+
# ------------------------------------------------------------------------------
|
|
689
|
+
# Generate a smoke test so `npm test` (vitest run) has at least one passing test
|
|
690
|
+
# ------------------------------------------------------------------------------
|
|
691
|
+
cat <<'EOF' > src/base-path.test.ts
|
|
692
|
+
import { expect, test } from "vitest";
|
|
693
|
+
import { withBase } from "./shared/configuration/base-path";
|
|
694
|
+
|
|
695
|
+
test("withBase normalizes the leading slash", () => {
|
|
696
|
+
expect(withBase("home")).toBe(withBase("/home"));
|
|
697
|
+
expect(withBase("a/b")).toBe(withBase("/a/b"));
|
|
698
|
+
});
|
|
699
|
+
EOF
|
|
700
|
+
|
|
702
701
|
# ------------------------------------------------------------------------------
|
|
703
702
|
# Create Shared Directories & Modules
|
|
704
703
|
# ------------------------------------------------------------------------------
|
|
@@ -1333,8 +1332,6 @@ fi
|
|
|
1333
1332
|
if [ "$ENABLE_CHARTS" = true ]; then
|
|
1334
1333
|
mkdir -p src/components/chart-js
|
|
1335
1334
|
cat <<'EOF' > src/components/chart-js/chart-js.utility.ts
|
|
1336
|
-
import colorLib, { type Color, type RGBA } from "@kurkle/color";
|
|
1337
|
-
import { DateTime } from "luxon";
|
|
1338
1335
|
import "chartjs-adapter-luxon";
|
|
1339
1336
|
|
|
1340
1337
|
var _seed = Date.now();
|
|
@@ -1818,7 +1815,6 @@ fi
|
|
|
1818
1815
|
# micro-frontend (MFE) utility works even when context features are off.
|
|
1819
1816
|
if [ "$ENABLE_MFE_LOADER" = true ]; then
|
|
1820
1817
|
IMPORTS="$IMPORTS
|
|
1821
|
-
import { provide } from '@lit/context';
|
|
1822
1818
|
import { MfeLoaderContext } from './shared/contexts/mfe-loader.context';"
|
|
1823
1819
|
fi
|
|
1824
1820
|
|
|
@@ -2222,7 +2218,8 @@ $TREE
|
|
|
2222
2218
|
|
|
2223
2219
|
## 🎨 Code Style & Tooling
|
|
2224
2220
|
|
|
2225
|
-
- **
|
|
2221
|
+
- **Formatting**: oxfmt (\`$RUN_CMD fmt\` / \`$RUN_CMD fmt:check\`)
|
|
2222
|
+
- **Linting**: oxlint (\`$RUN_CMD lint\` / \`$RUN_CMD lint:fix\`)
|
|
2226
2223
|
- **Type Checking**: TypeScript (\`npx tsc --noEmit\`)
|
|
2227
2224
|
EOF
|
|
2228
2225
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quincarter/create-lit-app",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Interactive CLI initializer for Lit Element App Shell architecture",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"README.md"
|
|
27
27
|
],
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@changesets/cli": "^
|
|
30
|
-
"@types/node": "^26.
|
|
31
|
-
"tsx": "^4.23.
|
|
29
|
+
"@changesets/cli": "^3.0.1",
|
|
30
|
+
"@types/node": "^26.2.0",
|
|
31
|
+
"tsx": "^4.23.12",
|
|
32
32
|
"typescript": "^7.0.2"
|
|
33
33
|
},
|
|
34
34
|
"keywords": [
|