@batijs/cli 0.0.108 → 0.0.111
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/boilerplates/@batijs/edgedb/files/$package.json.js +70 -1
- package/dist/boilerplates/@batijs/eslint/files/$package.json.js +68 -1
- package/dist/boilerplates/@batijs/express/files/$package.json.js +85 -1
- package/dist/boilerplates/@batijs/express/files/express-entry.ts +19 -0
- package/dist/boilerplates/@batijs/express/types/express-entry.d.ts +1 -0
- package/dist/boilerplates/@batijs/h3/files/$package.json.js +86 -1
- package/dist/boilerplates/@batijs/h3/files/h3-entry.ts +25 -1
- package/dist/boilerplates/@batijs/h3/types/h3-entry.d.ts +1 -0
- package/dist/boilerplates/@batijs/hattip/files/$package.json.js +87 -1
- package/dist/boilerplates/@batijs/hattip/files/hattip-entry.ts +22 -1
- package/dist/boilerplates/@batijs/hattip/types/hattip-entry.d.ts +3 -0
- package/dist/boilerplates/@batijs/prettier/files/$package.json.js +64 -1
- package/dist/boilerplates/@batijs/prisma/files/$package.json.js +65 -1
- package/dist/boilerplates/@batijs/react/files/$package.json.js +162 -2
- package/dist/boilerplates/@batijs/react/files/layouts/LayoutDefault.tsx +2 -1
- package/dist/boilerplates/@batijs/react/types/components/Link.d.ts +4 -0
- package/dist/boilerplates/@batijs/react/types/layouts/HeadDefault.d.ts +1 -0
- package/dist/boilerplates/@batijs/react/types/layouts/LayoutDefault.d.ts +6 -0
- package/dist/boilerplates/@batijs/react/types/pages/+config.h.d.ts +41 -0
- package/dist/boilerplates/@batijs/react/types/pages/_error/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/react/types/pages/index/+Page.d.ts +1 -0
- package/dist/boilerplates/@batijs/react/types/pages/index/Counter.d.ts +1 -0
- package/dist/boilerplates/@batijs/react/types/pages/star-wars/@id/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/react/types/pages/star-wars/@id/+onBeforeRender.d.ts +10 -0
- package/dist/boilerplates/@batijs/react/types/pages/star-wars/filterMovieData.d.ts +2 -0
- package/dist/boilerplates/@batijs/react/types/pages/star-wars/index/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/react/types/pages/star-wars/index/+onBeforeRender.d.ts +9 -0
- package/dist/boilerplates/@batijs/react/types/pages/star-wars/types.d.ts +12 -0
- package/dist/boilerplates/@batijs/react-telefunc/files/pages/todo/+Page.tsx +1 -2
- package/dist/boilerplates/@batijs/react-telefunc/files/pages/todo/+onBeforeRender.ts +1 -1
- package/dist/boilerplates/@batijs/react-telefunc/files/pages/todo/TodoList.telefunc.ts +1 -1
- package/dist/boilerplates/@batijs/react-telefunc/files/pages/todo/TodoList.tsx +1 -2
- package/dist/boilerplates/@batijs/react-telefunc/types/pages/todo/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/react-telefunc/types/pages/todo/+config.h.d.ts +4 -0
- package/dist/boilerplates/@batijs/react-telefunc/types/pages/todo/+onBeforeRender.d.ts +7 -0
- package/dist/boilerplates/@batijs/react-telefunc/types/pages/todo/TodoList.d.ts +4 -0
- package/dist/boilerplates/@batijs/react-telefunc/types/pages/todo/TodoList.telefunc.d.ts +4 -0
- package/dist/boilerplates/@batijs/react-trpc/files/pages/todo-trpc/+Page.tsx +25 -0
- package/dist/boilerplates/@batijs/react-trpc/files/pages/todo-trpc/+config.h.ts +5 -0
- package/dist/boilerplates/@batijs/react-trpc/files/pages/todo-trpc/+onBeforeRender.ts +13 -0
- package/dist/boilerplates/@batijs/react-trpc/files/pages/todo-trpc/TodoList.tsx +30 -0
- package/dist/boilerplates/@batijs/react-trpc/types/pages/todo-trpc/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/react-trpc/types/pages/todo-trpc/+config.h.d.ts +4 -0
- package/dist/boilerplates/@batijs/react-trpc/types/pages/todo-trpc/+onBeforeRender.d.ts +7 -0
- package/dist/boilerplates/@batijs/react-trpc/types/pages/todo-trpc/TodoList.d.ts +4 -0
- package/dist/boilerplates/@batijs/shared/files/$index.html.js +10 -6
- package/dist/boilerplates/@batijs/shared/types/vite.config.d.ts +2 -0
- package/dist/boilerplates/@batijs/shared-db/types/database/todoItems.d.ts +6 -0
- package/dist/boilerplates/@batijs/solid/files/$package.json.js +168 -2
- package/dist/boilerplates/@batijs/solid/files/layouts/LayoutDefault.tsx +2 -1
- package/dist/boilerplates/@batijs/solid/types/components/Link.d.ts +4 -0
- package/dist/boilerplates/@batijs/solid/types/layouts/HeadDefault.d.ts +1 -0
- package/dist/boilerplates/@batijs/solid/types/layouts/LayoutDefault.d.ts +6 -0
- package/dist/boilerplates/@batijs/solid/types/pages/+config.h.d.ts +40 -0
- package/dist/boilerplates/@batijs/solid/types/pages/_error/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/solid/types/pages/index/+Page.d.ts +1 -0
- package/dist/boilerplates/@batijs/solid/types/pages/index/Counter.d.ts +2 -0
- package/dist/boilerplates/@batijs/solid/types/pages/star-wars/@id/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/solid/types/pages/star-wars/@id/+onBeforeRender.d.ts +11 -0
- package/dist/boilerplates/@batijs/solid/types/pages/star-wars/filterMovieData.d.ts +3 -0
- package/dist/boilerplates/@batijs/solid/types/pages/star-wars/index/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/solid/types/pages/star-wars/index/+onBeforePrerenderStart.d.ts +18 -0
- package/dist/boilerplates/@batijs/solid/types/pages/star-wars/index/+onBeforeRender.d.ts +10 -0
- package/dist/boilerplates/@batijs/solid/types/pages/star-wars/index/getStarWarsMovies.d.ts +7 -0
- package/dist/boilerplates/@batijs/solid/types/pages/star-wars/types.d.ts +12 -0
- package/dist/boilerplates/@batijs/solid-telefunc/files/pages/todo/+Page.tsx +1 -1
- package/dist/boilerplates/@batijs/solid-telefunc/files/pages/todo/+onBeforeRender.ts +2 -2
- package/dist/boilerplates/@batijs/solid-telefunc/files/pages/todo/TodoList.telefunc.ts +2 -2
- package/dist/boilerplates/@batijs/solid-telefunc/files/pages/todo/TodoList.tsx +1 -1
- package/dist/boilerplates/@batijs/solid-telefunc/types/pages/todo/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/solid-telefunc/types/pages/todo/+config.h.d.ts +4 -0
- package/dist/boilerplates/@batijs/solid-telefunc/types/pages/todo/+onBeforeRender.d.ts +8 -0
- package/dist/boilerplates/@batijs/solid-telefunc/types/pages/todo/TodoList.d.ts +4 -0
- package/dist/boilerplates/@batijs/solid-telefunc/types/pages/todo/TodoList.telefunc.d.ts +5 -0
- package/dist/boilerplates/@batijs/solid-trpc/files/pages/todo-trpc/+Page.tsx +25 -0
- package/dist/boilerplates/@batijs/solid-trpc/files/pages/todo-trpc/+config.h.ts +3 -0
- package/dist/boilerplates/@batijs/solid-trpc/files/pages/todo-trpc/+onBeforeRender.ts +15 -0
- package/dist/boilerplates/@batijs/solid-trpc/files/pages/todo-trpc/TodoList.tsx +28 -0
- package/dist/boilerplates/@batijs/solid-trpc/types/pages/todo-trpc/+Page.d.ts +4 -0
- package/dist/boilerplates/@batijs/solid-trpc/types/pages/todo-trpc/+config.h.d.ts +4 -0
- package/dist/boilerplates/@batijs/solid-trpc/types/pages/todo-trpc/+onBeforeRender.d.ts +8 -0
- package/dist/boilerplates/@batijs/solid-trpc/types/pages/todo-trpc/TodoList.d.ts +4 -0
- package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +87 -2
- package/dist/boilerplates/@batijs/tailwindcss/files/tailwind.config.ts +10 -0
- package/dist/boilerplates/@batijs/tailwindcss/types/postcss.config.d.ts +7 -0
- package/dist/boilerplates/@batijs/tailwindcss/types/tailwind.config.d.ts +11 -0
- package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +65 -1
- package/dist/boilerplates/@batijs/trpc/files/$package.json.js +100 -0
- package/dist/boilerplates/@batijs/trpc/files/$vite.config.ts.js +13 -0
- package/dist/boilerplates/@batijs/trpc/files/trpc/client.ts +10 -0
- package/dist/boilerplates/@batijs/trpc/files/trpc/server.ts +34 -0
- package/dist/boilerplates/@batijs/trpc/files/trpc/vite-plugin.ts +49 -0
- package/dist/boilerplates/@batijs/trpc/types/trpc/client.d.ts +38 -0
- package/dist/boilerplates/@batijs/trpc/types/trpc/server.d.ts +64 -0
- package/dist/boilerplates/@batijs/trpc/types/trpc/vite-plugin.d.ts +12 -0
- package/dist/boilerplates/@batijs/vercel/files/$package.json.js +66 -1
- package/dist/boilerplates/@batijs/vue/files/$package.json.js +111 -2
- package/dist/boilerplates/@batijs/vue/files/layouts/LayoutDefault.vue +5 -1
- package/dist/boilerplates/@batijs/vue/types/pages/+config.h.d.ts +43 -0
- package/dist/boilerplates/@batijs/vue/types/pages/star-wars/@id/+onBeforeRender.d.ts +11 -0
- package/dist/boilerplates/@batijs/vue/types/pages/star-wars/filterMovieData.d.ts +3 -0
- package/dist/boilerplates/@batijs/vue/types/pages/star-wars/index/+onBeforeRender.d.ts +10 -0
- package/dist/boilerplates/@batijs/vue/types/pages/star-wars/types.d.ts +12 -0
- package/dist/boilerplates/@batijs/vue-telefunc/files/components/TodoList.telefunc.ts +2 -2
- package/dist/boilerplates/@batijs/vue-telefunc/files/components/TodoList.vue +5 -13
- package/dist/boilerplates/@batijs/vue-telefunc/files/pages/todo/+Page.vue +2 -3
- package/dist/boilerplates/@batijs/vue-telefunc/files/pages/todo/+onBeforeRender.ts +2 -2
- package/dist/boilerplates/@batijs/vue-telefunc/types/components/TodoList.telefunc.d.ts +5 -0
- package/dist/boilerplates/@batijs/vue-telefunc/types/pages/todo/+config.h.d.ts +4 -0
- package/dist/boilerplates/@batijs/vue-telefunc/types/pages/todo/+onBeforeRender.d.ts +8 -0
- package/dist/boilerplates/@batijs/vue-trpc/files/components/TodoListTrpc.vue +29 -0
- package/dist/boilerplates/@batijs/vue-trpc/files/pages/todo-trpc/+Page.vue +19 -0
- package/dist/boilerplates/@batijs/vue-trpc/files/pages/todo-trpc/+config.h.ts +3 -0
- package/dist/boilerplates/@batijs/vue-trpc/files/pages/todo-trpc/+onBeforeRender.ts +15 -0
- package/dist/boilerplates/@batijs/vue-trpc/types/pages/todo-trpc/+config.h.d.ts +4 -0
- package/dist/boilerplates/@batijs/vue-trpc/types/pages/todo-trpc/+onBeforeRender.d.ts +8 -0
- package/dist/boilerplates/boilerplates.json +75 -0
- package/dist/{chunk-chunk-HOVHXSZ5.js → chunk-P3F3WO2D.js} +1 -1
- package/dist/index.js +12 -5
- package/dist/{chunk-prompt-LPA56PA5.js → prompt-QGA753QE.js} +1 -1
- package/package.json +5 -5
- package/dist/boilerplates/@batijs/edgedb/package-BD3G47NI.js +0 -64
- package/dist/boilerplates/@batijs/eslint/package-L5KZG4F3.js +0 -62
- package/dist/boilerplates/@batijs/express/package-KV3NAHNP.js +0 -69
- package/dist/boilerplates/@batijs/h3/package-TUTMSCQF.js +0 -70
- package/dist/boilerplates/@batijs/hattip/package-VKEJY76G.js +0 -69
- package/dist/boilerplates/@batijs/prettier/package-MCK4YCPP.js +0 -62
- package/dist/boilerplates/@batijs/prisma/package-JDCZNZLS.js +0 -63
- package/dist/boilerplates/@batijs/react/package-O2DZQ5DB.js +0 -75
- package/dist/boilerplates/@batijs/react-telefunc/files/database/todoItems.ts +0 -9
- package/dist/boilerplates/@batijs/solid/package-2AEIPM6V.js +0 -69
- package/dist/boilerplates/@batijs/tailwindcss/files/tailwind.config.js +0 -8
- package/dist/boilerplates/@batijs/tailwindcss/package-CMMRUVWD.js +0 -65
- package/dist/boilerplates/@batijs/telefunc/package-NGJ3M2KO.js +0 -63
- package/dist/boilerplates/@batijs/vercel/package-QY45OGDN.js +0 -64
- package/dist/boilerplates/@batijs/vue/package-7RHEEZZN.js +0 -72
- package/dist/boilerplates/@batijs/vue-telefunc/files/database/todoItems.ts +0 -12
- package/dist/boilerplates/@batijs/{solid-telefunc → shared-db}/files/database/todoItems.ts +3 -3
|
@@ -1,13 +1,179 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
27
|
+
// package.json
|
|
28
|
+
var require_package = __commonJS({
|
|
29
|
+
"package.json"(exports, module) {
|
|
30
|
+
module.exports = {
|
|
31
|
+
name: "@batijs/solid",
|
|
32
|
+
private: true,
|
|
33
|
+
version: "0.0.92",
|
|
34
|
+
description: "",
|
|
35
|
+
type: "module",
|
|
36
|
+
scripts: {
|
|
37
|
+
"check-types": "tsc --noEmit",
|
|
38
|
+
build: "bati-compile-boilerplate"
|
|
39
|
+
},
|
|
40
|
+
keywords: [],
|
|
41
|
+
author: "",
|
|
42
|
+
license: "MIT",
|
|
43
|
+
devDependencies: {
|
|
44
|
+
"@batijs/compile": "workspace:*",
|
|
45
|
+
"@types/node": "^16.18.40",
|
|
46
|
+
"cross-fetch": "^4.0.0",
|
|
47
|
+
"eslint-plugin-solid": "^0.13.0",
|
|
48
|
+
"solid-js": "^1.8.4",
|
|
49
|
+
tailwindcss: "^3.3.5",
|
|
50
|
+
typescript: "^5.2.2",
|
|
51
|
+
vike: "^0.4.144",
|
|
52
|
+
"vike-solid": "^0.2.3",
|
|
53
|
+
vite: "^4.5.0",
|
|
54
|
+
"vite-plugin-solid": "^2.7.2"
|
|
55
|
+
},
|
|
56
|
+
dependencies: {
|
|
57
|
+
"@batijs/core": "workspace:*"
|
|
58
|
+
},
|
|
59
|
+
files: [
|
|
60
|
+
"dist/"
|
|
61
|
+
],
|
|
62
|
+
bati: {
|
|
63
|
+
if: {
|
|
64
|
+
flag: "solid"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
exports: {
|
|
68
|
+
"./components/Link": {
|
|
69
|
+
types: "./dist/types/components/Link.d.ts"
|
|
70
|
+
},
|
|
71
|
+
"./layouts/HeadDefault": {
|
|
72
|
+
types: "./dist/types/layouts/HeadDefault.d.ts"
|
|
73
|
+
},
|
|
74
|
+
"./layouts/LayoutDefault": {
|
|
75
|
+
types: "./dist/types/layouts/LayoutDefault.d.ts"
|
|
76
|
+
},
|
|
77
|
+
"./pages/+config.h": {
|
|
78
|
+
types: "./dist/types/pages/+config.h.d.ts"
|
|
79
|
+
},
|
|
80
|
+
"./pages/_error/+Page": {
|
|
81
|
+
types: "./dist/types/pages/_error/+Page.d.ts"
|
|
82
|
+
},
|
|
83
|
+
"./pages/index/Counter": {
|
|
84
|
+
types: "./dist/types/pages/index/Counter.d.ts"
|
|
85
|
+
},
|
|
86
|
+
"./pages/index/+Page": {
|
|
87
|
+
types: "./dist/types/pages/index/+Page.d.ts"
|
|
88
|
+
},
|
|
89
|
+
"./pages/star-wars/types": {
|
|
90
|
+
types: "./dist/types/pages/star-wars/types.d.ts"
|
|
91
|
+
},
|
|
92
|
+
"./pages/star-wars/filterMovieData": {
|
|
93
|
+
types: "./dist/types/pages/star-wars/filterMovieData.d.ts"
|
|
94
|
+
},
|
|
95
|
+
"./pages/star-wars/@id/+Page": {
|
|
96
|
+
types: "./dist/types/pages/star-wars/@id/+Page.d.ts"
|
|
97
|
+
},
|
|
98
|
+
"./pages/star-wars/@id/+onBeforeRender": {
|
|
99
|
+
types: "./dist/types/pages/star-wars/@id/+onBeforeRender.d.ts"
|
|
100
|
+
},
|
|
101
|
+
"./pages/star-wars/index/+Page": {
|
|
102
|
+
types: "./dist/types/pages/star-wars/index/+Page.d.ts"
|
|
103
|
+
},
|
|
104
|
+
"./pages/star-wars/index/getStarWarsMovies": {
|
|
105
|
+
types: "./dist/types/pages/star-wars/index/getStarWarsMovies.d.ts"
|
|
106
|
+
},
|
|
107
|
+
"./pages/star-wars/index/+onBeforePrerenderStart": {
|
|
108
|
+
types: "./dist/types/pages/star-wars/index/+onBeforePrerenderStart.d.ts"
|
|
109
|
+
},
|
|
110
|
+
"./pages/star-wars/index/+onBeforeRender": {
|
|
111
|
+
types: "./dist/types/pages/star-wars/index/+onBeforeRender.d.ts"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
typesVersions: {
|
|
115
|
+
"*": {
|
|
116
|
+
"components/Link": [
|
|
117
|
+
"./dist/types/components/Link.d.ts"
|
|
118
|
+
],
|
|
119
|
+
"layouts/HeadDefault": [
|
|
120
|
+
"./dist/types/layouts/HeadDefault.d.ts"
|
|
121
|
+
],
|
|
122
|
+
"layouts/LayoutDefault": [
|
|
123
|
+
"./dist/types/layouts/LayoutDefault.d.ts"
|
|
124
|
+
],
|
|
125
|
+
"pages/+config.h": [
|
|
126
|
+
"./dist/types/pages/+config.h.d.ts"
|
|
127
|
+
],
|
|
128
|
+
"pages/_error/+Page": [
|
|
129
|
+
"./dist/types/pages/_error/+Page.d.ts"
|
|
130
|
+
],
|
|
131
|
+
"pages/index/Counter": [
|
|
132
|
+
"./dist/types/pages/index/Counter.d.ts"
|
|
133
|
+
],
|
|
134
|
+
"pages/index/+Page": [
|
|
135
|
+
"./dist/types/pages/index/+Page.d.ts"
|
|
136
|
+
],
|
|
137
|
+
"pages/star-wars/types": [
|
|
138
|
+
"./dist/types/pages/star-wars/types.d.ts"
|
|
139
|
+
],
|
|
140
|
+
"pages/star-wars/filterMovieData": [
|
|
141
|
+
"./dist/types/pages/star-wars/filterMovieData.d.ts"
|
|
142
|
+
],
|
|
143
|
+
"pages/star-wars/@id/+Page": [
|
|
144
|
+
"./dist/types/pages/star-wars/@id/+Page.d.ts"
|
|
145
|
+
],
|
|
146
|
+
"pages/star-wars/@id/+onBeforeRender": [
|
|
147
|
+
"./dist/types/pages/star-wars/@id/+onBeforeRender.d.ts"
|
|
148
|
+
],
|
|
149
|
+
"pages/star-wars/index/+Page": [
|
|
150
|
+
"./dist/types/pages/star-wars/index/+Page.d.ts"
|
|
151
|
+
],
|
|
152
|
+
"pages/star-wars/index/getStarWarsMovies": [
|
|
153
|
+
"./dist/types/pages/star-wars/index/getStarWarsMovies.d.ts"
|
|
154
|
+
],
|
|
155
|
+
"pages/star-wars/index/+onBeforePrerenderStart": [
|
|
156
|
+
"./dist/types/pages/star-wars/index/+onBeforePrerenderStart.d.ts"
|
|
157
|
+
],
|
|
158
|
+
"pages/star-wars/index/+onBeforeRender": [
|
|
159
|
+
"./dist/types/pages/star-wars/index/+onBeforeRender.d.ts"
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
|
|
1
167
|
// files/$package.json.ts
|
|
2
168
|
import { addDependency, loadAsJson } from "@batijs/core";
|
|
3
169
|
async function getPackageJson(props) {
|
|
4
170
|
const packageJson = await loadAsJson(props);
|
|
5
171
|
if (props.meta.BATI.has("eslint")) {
|
|
6
|
-
addDependency(packageJson, await
|
|
172
|
+
addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)), {
|
|
7
173
|
devDependencies: ["eslint-plugin-solid"]
|
|
8
174
|
});
|
|
9
175
|
}
|
|
10
|
-
return addDependency(packageJson, await
|
|
176
|
+
return addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)), {
|
|
11
177
|
devDependencies: ["vite"],
|
|
12
178
|
dependencies: ["cross-fetch", "solid-js", "vike-solid", "vike"]
|
|
13
179
|
});
|
|
@@ -20,7 +20,8 @@ export default function LayoutDefault(props: { children?: JSX.Element }) {
|
|
|
20
20
|
<Sidebar>
|
|
21
21
|
<Logo />
|
|
22
22
|
<Link href="/">Welcome</Link>
|
|
23
|
-
{BATI.has("telefunc") ? <Link href="/todo">Todo</Link> : undefined}
|
|
23
|
+
{BATI.has("telefunc") ? <Link href="/todo">Todo (telefunc)</Link> : undefined}
|
|
24
|
+
{BATI.has("trpc") ? <Link href="/todo-trpc">Todo (tRPC)</Link> : undefined}
|
|
24
25
|
<Link href="/star-wars">Data Fetching</Link>
|
|
25
26
|
</Sidebar>
|
|
26
27
|
<Content>{props.children}</Content>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function HeadDefault(): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import Layout from "../layouts/LayoutDefault";
|
|
2
|
+
import Head from "../layouts/HeadDefault";
|
|
3
|
+
declare const _default: {
|
|
4
|
+
Layout: typeof Layout;
|
|
5
|
+
Head: typeof Head;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
extends: {
|
|
9
|
+
onRenderHtml: "import:vike-solid/renderer/onRenderHtml:onRenderHtml";
|
|
10
|
+
onRenderClient: "import:vike-solid/renderer/onRenderClient:onRenderClient";
|
|
11
|
+
passToClient: string[];
|
|
12
|
+
clientRouting: true;
|
|
13
|
+
hydrationCanBeAborted: true;
|
|
14
|
+
meta: {
|
|
15
|
+
Head: {
|
|
16
|
+
env: "server-only";
|
|
17
|
+
};
|
|
18
|
+
Layout: {
|
|
19
|
+
env: "server-and-client";
|
|
20
|
+
};
|
|
21
|
+
title: {
|
|
22
|
+
env: "server-and-client";
|
|
23
|
+
};
|
|
24
|
+
description: {
|
|
25
|
+
env: "server-only";
|
|
26
|
+
};
|
|
27
|
+
favicon: {
|
|
28
|
+
env: "server-only";
|
|
29
|
+
};
|
|
30
|
+
lang: {
|
|
31
|
+
env: "server-only";
|
|
32
|
+
};
|
|
33
|
+
ssr: {
|
|
34
|
+
env: "config-only";
|
|
35
|
+
effect: import("vike/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn").ConfigEffect;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Page(): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default onBeforeRender;
|
|
2
|
+
import type { PageContextBuiltInServer } from "vike/types";
|
|
3
|
+
import type { MovieDetails } from "../types";
|
|
4
|
+
declare function onBeforeRender(pageContext: PageContextBuiltInServer): Promise<{
|
|
5
|
+
pageContext: {
|
|
6
|
+
pageProps: {
|
|
7
|
+
movie: MovieDetails;
|
|
8
|
+
};
|
|
9
|
+
title: string;
|
|
10
|
+
};
|
|
11
|
+
}>;
|
package/dist/boilerplates/@batijs/solid/types/pages/star-wars/index/+onBeforePrerenderStart.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export default onBeforePrerenderStart;
|
|
2
|
+
declare function onBeforePrerenderStart(): Promise<({
|
|
3
|
+
url: string;
|
|
4
|
+
pageContext: {
|
|
5
|
+
pageProps: {
|
|
6
|
+
movie: import("../types").MovieDetails;
|
|
7
|
+
};
|
|
8
|
+
title: string;
|
|
9
|
+
};
|
|
10
|
+
} | {
|
|
11
|
+
url: string;
|
|
12
|
+
pageContext: {
|
|
13
|
+
pageProps: {
|
|
14
|
+
movies: import("../types").Movie[];
|
|
15
|
+
};
|
|
16
|
+
title: string;
|
|
17
|
+
};
|
|
18
|
+
})[]>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { getStarWarsMovies };
|
|
2
|
+
export { filterMoviesData };
|
|
3
|
+
export { getTitle };
|
|
4
|
+
import type { Movie, MovieDetails } from "../types";
|
|
5
|
+
declare function getStarWarsMovies(): Promise<MovieDetails[]>;
|
|
6
|
+
declare function filterMoviesData(movies: MovieDetails[]): Movie[];
|
|
7
|
+
declare function getTitle(movies: Movie[] | MovieDetails[]): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { TodoItem } from "@batijs/shared-db/database/todoItems";
|
|
1
2
|
import { createSignal } from "solid-js";
|
|
2
|
-
import type { TodoItem } from "../../database/todoItems";
|
|
3
3
|
import { TodoList } from "./TodoList";
|
|
4
4
|
|
|
5
5
|
export default function Page(props: { initialTodoItems: TodoItem[] }) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { todoItems } from "@batijs/shared-db/database/todoItems";
|
|
2
|
+
|
|
1
3
|
// https://vike.dev/onBeforeRender
|
|
2
4
|
export default onBeforeRender;
|
|
3
5
|
|
|
4
|
-
import { todoItems } from "../../database/todoItems";
|
|
5
|
-
|
|
6
6
|
function onBeforeRender() {
|
|
7
7
|
const initialTodoItems = todoItems;
|
|
8
8
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { todoItems, type TodoItem } from "@batijs/shared-db/database/todoItems";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
export { onNewTodo };
|
|
4
4
|
|
|
5
5
|
async function onNewTodo({ text }: TodoItem) {
|
|
6
6
|
todoItems.push({ text });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { TodoItem } from "@batijs/shared-db/database/todoItems";
|
|
1
2
|
import { createSignal, For, untrack } from "solid-js";
|
|
2
|
-
import type { TodoItem } from "../../database/todoItems.js";
|
|
3
3
|
import { onNewTodo } from "./TodoList.telefunc.js";
|
|
4
4
|
|
|
5
5
|
export function TodoList(props: { initialTodoItems: TodoItem[] }) {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { TodoItem } from "@batijs/shared-db/database/todoItems";
|
|
2
|
+
import { createSignal } from "solid-js";
|
|
3
|
+
import { TodoList } from "./TodoList";
|
|
4
|
+
|
|
5
|
+
export default function Page(props: { initialTodoItems: TodoItem[] }) {
|
|
6
|
+
return (
|
|
7
|
+
<>
|
|
8
|
+
<h1>To-do List</h1>
|
|
9
|
+
<TodoList initialTodoItems={props.initialTodoItems} />
|
|
10
|
+
<Counter />
|
|
11
|
+
</>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function Counter() {
|
|
16
|
+
const [count, setCount] = createSignal(0);
|
|
17
|
+
return (
|
|
18
|
+
<div>
|
|
19
|
+
This page is interactive:
|
|
20
|
+
<button type="button" onClick={() => setCount((count) => count + 1)}>
|
|
21
|
+
Counter {count()}
|
|
22
|
+
</button>
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { todoItems } from "@batijs/shared-db/database/todoItems";
|
|
2
|
+
|
|
3
|
+
// https://vike.dev/onBeforeRender
|
|
4
|
+
export default onBeforeRender;
|
|
5
|
+
|
|
6
|
+
function onBeforeRender() {
|
|
7
|
+
const initialTodoItems = todoItems;
|
|
8
|
+
return {
|
|
9
|
+
pageContext: {
|
|
10
|
+
pageProps: {
|
|
11
|
+
initialTodoItems,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { TodoItem } from "@batijs/shared-db/database/todoItems";
|
|
2
|
+
import { trpc } from "@batijs/trpc/trpc/client";
|
|
3
|
+
import { createSignal, For, untrack } from "solid-js";
|
|
4
|
+
|
|
5
|
+
export function TodoList(props: { initialTodoItems: TodoItem[] }) {
|
|
6
|
+
const [todoItems, setTodoItems] = createSignal(props.initialTodoItems);
|
|
7
|
+
const [draft, setDraft] = createSignal("");
|
|
8
|
+
return (
|
|
9
|
+
<>
|
|
10
|
+
<ul>
|
|
11
|
+
<For each={todoItems()}>{(todoItem) => <li>{todoItem.text}</li>}</For>
|
|
12
|
+
<li>
|
|
13
|
+
<form
|
|
14
|
+
onSubmit={async (ev) => {
|
|
15
|
+
ev.preventDefault();
|
|
16
|
+
const { todoItems } = await trpc.onNewTodo.mutate(untrack(draft));
|
|
17
|
+
setDraft("");
|
|
18
|
+
setTodoItems(todoItems);
|
|
19
|
+
}}
|
|
20
|
+
>
|
|
21
|
+
<input type="text" onChange={(ev) => setDraft(ev.target.value)} value={draft()} />{" "}
|
|
22
|
+
<button type="submit">Add to-do</button>
|
|
23
|
+
</form>
|
|
24
|
+
</li>
|
|
25
|
+
</ul>
|
|
26
|
+
</>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
@@ -1,9 +1,94 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
27
|
+
// package.json
|
|
28
|
+
var require_package = __commonJS({
|
|
29
|
+
"package.json"(exports, module) {
|
|
30
|
+
module.exports = {
|
|
31
|
+
name: "@batijs/tailwindcss",
|
|
32
|
+
private: true,
|
|
33
|
+
version: "0.0.92",
|
|
34
|
+
description: "",
|
|
35
|
+
type: "module",
|
|
36
|
+
scripts: {
|
|
37
|
+
"check-types": "tsc --noEmit",
|
|
38
|
+
build: "bati-compile-boilerplate"
|
|
39
|
+
},
|
|
40
|
+
keywords: [],
|
|
41
|
+
author: "",
|
|
42
|
+
license: "MIT",
|
|
43
|
+
devDependencies: {
|
|
44
|
+
"@batijs/compile": "workspace:*",
|
|
45
|
+
"@types/node": "^16.18.40",
|
|
46
|
+
autoprefixer: "^10.4.16",
|
|
47
|
+
daisyui: "^3.9.4",
|
|
48
|
+
postcss: "^8.4.31",
|
|
49
|
+
tailwindcss: "^3.3.5",
|
|
50
|
+
vike: "^0.4.144",
|
|
51
|
+
vite: "^4.5.0"
|
|
52
|
+
},
|
|
53
|
+
dependencies: {
|
|
54
|
+
"@batijs/core": "workspace:*"
|
|
55
|
+
},
|
|
56
|
+
files: [
|
|
57
|
+
"dist/"
|
|
58
|
+
],
|
|
59
|
+
bati: {
|
|
60
|
+
if: {
|
|
61
|
+
flag: "tailwindcss"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
exports: {
|
|
65
|
+
"./postcss.config": {
|
|
66
|
+
types: "./dist/types/postcss.config.d.ts"
|
|
67
|
+
},
|
|
68
|
+
"./tailwind.config": {
|
|
69
|
+
types: "./dist/types/tailwind.config.d.ts"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
typesVersions: {
|
|
73
|
+
"*": {
|
|
74
|
+
"postcss.config": [
|
|
75
|
+
"./dist/types/postcss.config.d.ts"
|
|
76
|
+
],
|
|
77
|
+
"tailwind.config": [
|
|
78
|
+
"./dist/types/tailwind.config.d.ts"
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
|
|
1
86
|
// files/$package.json.ts
|
|
2
87
|
import { addDependency, loadAsJson } from "@batijs/core";
|
|
3
88
|
async function getPackageJson(props) {
|
|
4
89
|
const packageJson = await loadAsJson(props);
|
|
5
|
-
return addDependency(packageJson, await
|
|
6
|
-
devDependencies: ["tailwindcss", "postcss", "autoprefixer"]
|
|
90
|
+
return addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)), {
|
|
91
|
+
devDependencies: ["tailwindcss", "postcss", "autoprefixer", ...props.meta.BATI.has("daisyui") ? ["daisyui"] : []]
|
|
7
92
|
});
|
|
8
93
|
}
|
|
9
94
|
export {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import daisyui from "daisyui";
|
|
2
|
+
import type { Config } from "tailwindcss";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
content: ["./{pages,layouts,components,src}/**/*.{html,js,jsx,ts,tsx,vue}"],
|
|
6
|
+
theme: {
|
|
7
|
+
extend: {},
|
|
8
|
+
},
|
|
9
|
+
plugins: BATI.has("daisyui") ? [daisyui] : [],
|
|
10
|
+
} satisfies Config;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
content: string[];
|
|
3
|
+
theme: {
|
|
4
|
+
extend: {};
|
|
5
|
+
};
|
|
6
|
+
plugins: {
|
|
7
|
+
handler: import("tailwindcss/types/config").PluginCreator;
|
|
8
|
+
config?: Partial<import("tailwindcss/types/config").Config> | undefined;
|
|
9
|
+
}[];
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|