@batijs/cli 0.0.93 → 0.0.95
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 +1 -1
- package/dist/boilerplates/@batijs/edgedb/{package-AB7SMJNM.js → package-6ZI46ULZ.js} +3 -3
- package/dist/boilerplates/@batijs/eslint/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/eslint/{package-GSTXS2EC.js → package-IO7HTZOL.js} +3 -3
- package/dist/boilerplates/@batijs/express/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/express/files/express-entry.ts +1 -1
- package/dist/boilerplates/@batijs/express/{package-5UDRG47T.js → package-ZPJEJFQC.js} +1 -1
- package/dist/boilerplates/@batijs/h3/files/h3-entry.ts +1 -1
- package/dist/boilerplates/@batijs/hattip/files/hattip-entry.ts +1 -1
- package/dist/boilerplates/@batijs/prisma/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/prisma/{package-RF3WI4AN.js → package-DHO62QLY.js} +2 -2
- package/dist/boilerplates/@batijs/react/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/react/{package-HKBS52LO.js → package-UB7NRNF7.js} +3 -3
- package/dist/boilerplates/@batijs/solid/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/solid/{package-F3DSO3FZ.js → package-AH7QMR5B.js} +2 -2
- package/dist/boilerplates/@batijs/vercel/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/vercel/{package-3OTPCELZ.js → package-Z3CBCFWC.js} +2 -2
- package/dist/boilerplates/@batijs/vue/files/$.eslintrc.json.js +3 -0
- package/dist/boilerplates/@batijs/vue/files/components/Content.vue +11 -5
- package/dist/boilerplates/@batijs/vue/files/components/Counter.vue +10 -5
- package/dist/boilerplates/@batijs/vue/files/components/Logo.vue +14 -5
- package/dist/boilerplates/@batijs/vue/files/components/Sidebar.vue +9 -5
- package/dist/boilerplates/@batijs/vue/files/layouts/HeadDefault.vue +7 -9
- package/dist/boilerplates/@batijs/vue/files/layouts/LayoutDefault.vue +5 -8
- package/dist/boilerplates/@batijs/vue/files/pages/index/+Page.vue +8 -8
- package/dist/index.js +8 -35
- package/package.json +5 -5
|
@@ -4,7 +4,7 @@ async function getPackageJson(props) {
|
|
|
4
4
|
const packageJson = await loadAsJson(props);
|
|
5
5
|
packageJson.scripts["edgedb:generate-queries"] = "@edgedb/generate queries";
|
|
6
6
|
packageJson.scripts["edgedb:generate-edgeql-js"] = "@edgedb/generate edgeql-js";
|
|
7
|
-
return addDependency(packageJson, await import("../package-
|
|
7
|
+
return addDependency(packageJson, await import("../package-6ZI46ULZ.js"), {
|
|
8
8
|
devDependencies: ["@edgedb/generate"],
|
|
9
9
|
dependencies: ["edgedb"]
|
|
10
10
|
});
|
|
@@ -13,11 +13,11 @@ var author = "";
|
|
|
13
13
|
var license = "MIT";
|
|
14
14
|
var devDependencies = {
|
|
15
15
|
"@batijs/tsup": "workspace:*",
|
|
16
|
-
"@edgedb/generate": "^0.3.
|
|
17
|
-
"@prisma/client": "^5.4.
|
|
16
|
+
"@edgedb/generate": "^0.3.4",
|
|
17
|
+
"@prisma/client": "^5.4.2",
|
|
18
18
|
"@types/node": "^16.18.40",
|
|
19
19
|
colorette: "^2.0.20",
|
|
20
|
-
edgedb: "^1.3.
|
|
20
|
+
edgedb: "^1.3.7",
|
|
21
21
|
tsup: "^7.2.0"
|
|
22
22
|
};
|
|
23
23
|
var dependencies = {
|
|
@@ -8,7 +8,7 @@ async function getPackageJson(props) {
|
|
|
8
8
|
precedence: 0
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
return addDependency(packageJson, await import("../package-
|
|
11
|
+
return addDependency(packageJson, await import("../package-IO7HTZOL.js"), {
|
|
12
12
|
devDependencies: ["eslint", "@typescript-eslint/parser", "@typescript-eslint/eslint-plugin"]
|
|
13
13
|
});
|
|
14
14
|
}
|
|
@@ -13,9 +13,9 @@ var scripts = {
|
|
|
13
13
|
};
|
|
14
14
|
var devDependencies = {
|
|
15
15
|
"@batijs/tsup": "workspace:^",
|
|
16
|
-
"@typescript-eslint/eslint-plugin": "^6.7.
|
|
17
|
-
"@typescript-eslint/parser": "^6.7.
|
|
18
|
-
eslint: "^8.
|
|
16
|
+
"@typescript-eslint/eslint-plugin": "^6.7.5",
|
|
17
|
+
"@typescript-eslint/parser": "^6.7.5",
|
|
18
|
+
eslint: "^8.51.0",
|
|
19
19
|
tsup: "^7.2.0"
|
|
20
20
|
};
|
|
21
21
|
var dependencies = {
|
|
@@ -18,7 +18,7 @@ async function getPackageJson(props) {
|
|
|
18
18
|
precedence: 20
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
|
-
return addDependency(packageJson, await import("../package-
|
|
21
|
+
return addDependency(packageJson, await import("../package-ZPJEJFQC.js"), {
|
|
22
22
|
devDependencies: ["@types/express"],
|
|
23
23
|
dependencies: [
|
|
24
24
|
"@hattip/adapter-node",
|
|
@@ -51,7 +51,7 @@ async function startServer() {
|
|
|
51
51
|
username: { label: "Username", type: "text", placeholder: "jsmith" },
|
|
52
52
|
password: { label: "Password", type: "password" },
|
|
53
53
|
},
|
|
54
|
-
async authorize(
|
|
54
|
+
async authorize() {
|
|
55
55
|
// Add logic here to look up the user from the credentials supplied
|
|
56
56
|
const user = { id: "1", name: "J Smith", email: "jsmith@example.com" };
|
|
57
57
|
|
|
@@ -15,7 +15,7 @@ var devDependencies = {
|
|
|
15
15
|
"@auth/core": "^0.16.1",
|
|
16
16
|
"@batijs/tsup": "workspace:*",
|
|
17
17
|
"@hattip/adapter-node": "^0.0.35",
|
|
18
|
-
"@types/express": "^4.17.
|
|
18
|
+
"@types/express": "^4.17.19",
|
|
19
19
|
"@types/node": "^16.18.40",
|
|
20
20
|
esno: "^0.17.0",
|
|
21
21
|
express: "^4.18.2",
|
|
@@ -70,7 +70,7 @@ async function startServer() {
|
|
|
70
70
|
username: { label: "Username", type: "text", placeholder: "jsmith" },
|
|
71
71
|
password: { label: "Password", type: "password" },
|
|
72
72
|
},
|
|
73
|
-
async authorize(
|
|
73
|
+
async authorize() {
|
|
74
74
|
// Add logic here to look up the user from the credentials supplied
|
|
75
75
|
const user = { id: "1", name: "J Smith", email: "jsmith@example.com" };
|
|
76
76
|
|
|
@@ -48,7 +48,7 @@ if (import.meta.BATI_MODULES?.includes("authjs")) {
|
|
|
48
48
|
username: { label: "Username", type: "text", placeholder: "username" },
|
|
49
49
|
password: { label: "Password", type: "password" },
|
|
50
50
|
},
|
|
51
|
-
async authorize(
|
|
51
|
+
async authorize() {
|
|
52
52
|
// Add logic here to look up the user from the credentials supplied
|
|
53
53
|
const user = { id: "1", name: "J Smith", email: "jsmith@example.com" };
|
|
54
54
|
|
|
@@ -4,7 +4,7 @@ async function getPackageJson(props) {
|
|
|
4
4
|
const packageJson = await loadAsJson(props);
|
|
5
5
|
packageJson.scripts["prisma:studio"] = "prisma studio";
|
|
6
6
|
packageJson.scripts["prisma:generate"] = "prisma generate";
|
|
7
|
-
return addDependency(packageJson, await import("../package-
|
|
7
|
+
return addDependency(packageJson, await import("../package-DHO62QLY.js"), {
|
|
8
8
|
devDependencies: ["prisma"],
|
|
9
9
|
dependencies: ["@prisma/client"]
|
|
10
10
|
});
|
|
@@ -13,10 +13,10 @@ var author = "";
|
|
|
13
13
|
var license = "MIT";
|
|
14
14
|
var devDependencies = {
|
|
15
15
|
"@batijs/tsup": "workspace:*",
|
|
16
|
-
"@prisma/client": "^5.4.
|
|
16
|
+
"@prisma/client": "^5.4.2",
|
|
17
17
|
"@types/node": "^16.18.40",
|
|
18
18
|
colorette: "^2.0.20",
|
|
19
|
-
prisma: "^5.4.
|
|
19
|
+
prisma: "^5.4.2",
|
|
20
20
|
tsup: "^7.2.0"
|
|
21
21
|
};
|
|
22
22
|
var dependencies = {
|
|
@@ -3,11 +3,11 @@ import { addDependency, loadAsJson } from "@batijs/core";
|
|
|
3
3
|
async function getPackageJson(props) {
|
|
4
4
|
const packageJson = await loadAsJson(props);
|
|
5
5
|
if (props.meta.BATI_MODULES?.includes("eslint")) {
|
|
6
|
-
addDependency(packageJson, await import("../package-
|
|
6
|
+
addDependency(packageJson, await import("../package-UB7NRNF7.js"), {
|
|
7
7
|
devDependencies: ["eslint-config-react-app"]
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
-
return addDependency(packageJson, await import("../package-
|
|
10
|
+
return addDependency(packageJson, await import("../package-UB7NRNF7.js"), {
|
|
11
11
|
devDependencies: ["vite", "@types/react", "@types/react-dom"],
|
|
12
12
|
dependencies: ["@vitejs/plugin-react", "cross-fetch", "react", "react-dom", "vike", "vike-react"]
|
|
13
13
|
});
|
|
@@ -12,13 +12,13 @@ var keywords = [];
|
|
|
12
12
|
var author = "";
|
|
13
13
|
var license = "MIT";
|
|
14
14
|
var devDependencies = {
|
|
15
|
-
"@babel/core": "^7.23.
|
|
15
|
+
"@babel/core": "^7.23.2",
|
|
16
16
|
"@babel/plugin-syntax-flow": "^7.22.5",
|
|
17
17
|
"@babel/plugin-transform-react-jsx": "^7.22.15",
|
|
18
18
|
"@batijs/tsup": "workspace:*",
|
|
19
19
|
"@types/node": "^16.18.40",
|
|
20
|
-
"@types/react": "^18.2.
|
|
21
|
-
"@types/react-dom": "^18.2.
|
|
20
|
+
"@types/react": "^18.2.28",
|
|
21
|
+
"@types/react-dom": "^18.2.13",
|
|
22
22
|
"@vitejs/plugin-react": "^4.1.0",
|
|
23
23
|
"cross-fetch": "^4.0.0",
|
|
24
24
|
"eslint-config-react-app": "^7.0.1",
|
|
@@ -3,11 +3,11 @@ import { addDependency, loadAsJson } from "@batijs/core";
|
|
|
3
3
|
async function getPackageJson(props) {
|
|
4
4
|
const packageJson = await loadAsJson(props);
|
|
5
5
|
if (props.meta.BATI_MODULES?.includes("eslint")) {
|
|
6
|
-
addDependency(packageJson, await import("../package-
|
|
6
|
+
addDependency(packageJson, await import("../package-AH7QMR5B.js"), {
|
|
7
7
|
devDependencies: ["eslint-plugin-solid"]
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
-
return addDependency(packageJson, await import("../package-
|
|
10
|
+
return addDependency(packageJson, await import("../package-AH7QMR5B.js"), {
|
|
11
11
|
devDependencies: ["vite"],
|
|
12
12
|
dependencies: ["cross-fetch", "solid-js", "vike-solid", "vike"]
|
|
13
13
|
});
|
|
@@ -16,14 +16,14 @@ var devDependencies = {
|
|
|
16
16
|
"@types/node": "^16.18.40",
|
|
17
17
|
"cross-fetch": "^4.0.0",
|
|
18
18
|
"eslint-plugin-solid": "^0.13.0",
|
|
19
|
-
"solid-js": "^1.
|
|
19
|
+
"solid-js": "^1.8.1",
|
|
20
20
|
tailwindcss: "^3.3.3",
|
|
21
21
|
tsup: "^7.2.0",
|
|
22
22
|
typescript: "^5.2.2",
|
|
23
23
|
vike: "^0.4.143",
|
|
24
24
|
"vike-solid": "^0.2.1",
|
|
25
25
|
vite: "^4.4.11",
|
|
26
|
-
"vite-plugin-solid": "^2.7.
|
|
26
|
+
"vite-plugin-solid": "^2.7.1"
|
|
27
27
|
};
|
|
28
28
|
var dependencies = {
|
|
29
29
|
"@batijs/core": "workspace:*"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { addDependency, loadAsJson } from "@batijs/core";
|
|
3
3
|
async function getPackageJson(props) {
|
|
4
4
|
const packageJson = await loadAsJson(props);
|
|
5
|
-
return addDependency(packageJson, await import("../package-
|
|
5
|
+
return addDependency(packageJson, await import("../package-Z3CBCFWC.js"), {
|
|
6
6
|
dependencies: ["vite-plugin-vercel", "@vite-plugin-vercel/vike"]
|
|
7
7
|
});
|
|
8
8
|
}
|
|
@@ -14,8 +14,8 @@ var license = "MIT";
|
|
|
14
14
|
var devDependencies = {
|
|
15
15
|
"@batijs/tsup": "workspace:*",
|
|
16
16
|
"@types/node": "^16.18.40",
|
|
17
|
-
"@vite-plugin-vercel/vike": "^0.4.
|
|
18
|
-
"vite-plugin-vercel": "^0.3.
|
|
17
|
+
"@vite-plugin-vercel/vike": "^0.4.2",
|
|
18
|
+
"vite-plugin-vercel": "^0.3.7",
|
|
19
19
|
tsup: "^7.2.0",
|
|
20
20
|
vite: "^4.4.11",
|
|
21
21
|
vike: "^0.4.143"
|
|
@@ -9,6 +9,9 @@ async function getEslintConfig(props) {
|
|
|
9
9
|
eslintConfig.parserOptions.parser = "@typescript-eslint/parser";
|
|
10
10
|
eslintConfig.rules ??= {};
|
|
11
11
|
eslintConfig.rules["vue/multi-word-component-names"] = "off";
|
|
12
|
+
eslintConfig.rules["vue/singleline-html-element-content-newline"] = "off";
|
|
13
|
+
eslintConfig.rules["vue/max-attributes-per-line"] = "off";
|
|
14
|
+
eslintConfig.rules["vue/html-self-closing"] = "off";
|
|
12
15
|
return eslintConfig;
|
|
13
16
|
}
|
|
14
17
|
export {
|
|
@@ -1,24 +1,29 @@
|
|
|
1
|
-
{{{! /* We are using the SquirrellyJS template syntax */ _}}}
|
|
2
|
-
|
|
3
1
|
<template>
|
|
4
2
|
<div id="page-container">
|
|
3
|
+
<!-- import.meta.BATI_MODULES?.includes("tailwindcss") -->
|
|
5
4
|
<div
|
|
6
5
|
id="page-content"
|
|
7
|
-
{{{ @if (it.import.meta.BATI_MODULES?.includes("tailwindcss")) }}}
|
|
8
6
|
class="p-5 pb-12 min-h-screen"
|
|
9
|
-
|
|
7
|
+
>
|
|
8
|
+
<slot />
|
|
9
|
+
</div>
|
|
10
|
+
<!-- !import.meta.BATI_MODULES?.includes("tailwindcss") -->
|
|
11
|
+
<div
|
|
12
|
+
id="page-content"
|
|
10
13
|
style="
|
|
11
14
|
padding: 20px;
|
|
12
15
|
padding-bottom: 50px;
|
|
13
16
|
min-height: 100vh;
|
|
14
17
|
"
|
|
15
|
-
{{{ /if }}}
|
|
16
18
|
>
|
|
17
19
|
<slot />
|
|
18
20
|
</div>
|
|
19
21
|
</div>
|
|
20
22
|
</template>
|
|
21
23
|
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
</script>
|
|
26
|
+
|
|
22
27
|
<style>
|
|
23
28
|
/* Page Transition Animation */
|
|
24
29
|
body.page-is-transitioning #page-content {
|
|
@@ -33,3 +38,4 @@ body.page-is-transitioning #page-content {
|
|
|
33
38
|
transition: opacity 0.3s ease-in-out;
|
|
34
39
|
}
|
|
35
40
|
</style>
|
|
41
|
+
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
{{{! /* We are using the SquirrellyJS template syntax */ _}}}
|
|
2
|
-
|
|
3
1
|
<template>
|
|
2
|
+
<!-- import.meta.BATI_MODULES?.includes("tailwindcss") -->
|
|
4
3
|
<button
|
|
5
4
|
type="button"
|
|
6
|
-
{{{ @if (it.import.meta.BATI_MODULES?.includes("tailwindcss")) }}}
|
|
7
5
|
class="inline-block border border-black rounded bg-gray-200 px-2 py-1 text-xs font-medium uppercase leading-normal"
|
|
8
|
-
|
|
6
|
+
@click="state.count++"
|
|
7
|
+
>
|
|
8
|
+
Counter {{ state.count }}
|
|
9
|
+
</button>
|
|
10
|
+
<!-- !import.meta.BATI_MODULES?.includes("tailwindcss") -->
|
|
11
|
+
<button
|
|
12
|
+
type="button"
|
|
9
13
|
@click="state.count++"
|
|
10
14
|
>
|
|
11
15
|
Counter {{ state.count }}
|
|
@@ -13,7 +17,8 @@
|
|
|
13
17
|
</template>
|
|
14
18
|
|
|
15
19
|
<script lang="ts">
|
|
16
|
-
import { reactive } from
|
|
20
|
+
import { reactive } from "vue";
|
|
21
|
+
|
|
17
22
|
export default {
|
|
18
23
|
setup() {
|
|
19
24
|
const state = reactive({ count: 0 })
|
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
{{{! /* We are using the SquirrellyJS template syntax */ _}}}
|
|
2
|
-
|
|
3
1
|
<template>
|
|
2
|
+
<!-- import.meta.BATI_MODULES?.includes("tailwindcss") -->
|
|
4
3
|
<div
|
|
5
|
-
{{{ @if (it.import.meta.BATI_MODULES?.includes("tailwindcss")) }}}
|
|
6
4
|
class="p-5 mb-2"
|
|
7
|
-
|
|
5
|
+
>
|
|
6
|
+
<a href="/">
|
|
7
|
+
<img
|
|
8
|
+
src="../assets/logo.svg"
|
|
9
|
+
height="64"
|
|
10
|
+
width="64"
|
|
11
|
+
>
|
|
12
|
+
</a>
|
|
13
|
+
</div>
|
|
14
|
+
<!-- !import.meta.BATI_MODULES?.includes("tailwindcss") -->
|
|
15
|
+
<div
|
|
8
16
|
style="
|
|
9
17
|
margin-top: 20px;
|
|
10
18
|
margin-bottom: 10px;
|
|
11
19
|
"
|
|
12
|
-
{{{ /if }}}
|
|
13
20
|
>
|
|
14
21
|
<a href="/">
|
|
15
22
|
<img
|
|
@@ -20,3 +27,5 @@
|
|
|
20
27
|
</a>
|
|
21
28
|
</div>
|
|
22
29
|
</template>
|
|
30
|
+
<script setup lang="ts">
|
|
31
|
+
</script>
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
{{{! /* We are using the SquirrellyJS template syntax */ _}}}
|
|
2
|
-
|
|
3
1
|
<template>
|
|
2
|
+
<!-- import.meta.BATI_MODULES?.includes("tailwindcss") -->
|
|
4
3
|
<div
|
|
5
4
|
id="sidebar"
|
|
6
|
-
{{{ @if (it.import.meta.BATI_MODULES?.includes("tailwindcss")) }}}
|
|
7
5
|
class="p-5 flex flex-col shrink-0 border-r-2 border-r-gray-200"
|
|
8
|
-
|
|
6
|
+
>
|
|
7
|
+
<slot />
|
|
8
|
+
</div>
|
|
9
|
+
<!-- !import.meta.BATI_MODULES?.includes("tailwindcss") -->
|
|
10
|
+
<div
|
|
11
|
+
id="sidebar"
|
|
9
12
|
style="
|
|
10
13
|
padding: 20px;
|
|
11
14
|
flex-shrink: 0;
|
|
@@ -14,8 +17,9 @@
|
|
|
14
17
|
line-height: 1.8em;
|
|
15
18
|
border-right: 2px solid #eee;
|
|
16
19
|
"
|
|
17
|
-
{{{ /if }}}
|
|
18
20
|
>
|
|
19
21
|
<slot />
|
|
20
22
|
</div>
|
|
21
23
|
</template>
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
</script>
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
{{{! /* We are using the SquirrellyJS template syntax */ _}}}
|
|
2
|
-
|
|
3
1
|
<!-- Default <head> (can be overridden by pages) -->
|
|
4
2
|
|
|
5
3
|
<template>
|
|
@@ -7,13 +5,13 @@
|
|
|
7
5
|
name="viewport"
|
|
8
6
|
content="width=device-width, initial-scale=1"
|
|
9
7
|
>
|
|
10
|
-
|
|
8
|
+
|
|
9
|
+
<!-- import.meta.BATI_MODULES?.includes("plausible.io") -->
|
|
11
10
|
<!-- See https://plausible.io/docs/plausible-script -->
|
|
12
11
|
<!-- TODO: update data-domain -->
|
|
13
|
-
<script
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
src="https://plausible.io/js/script.js"
|
|
17
|
-
/>
|
|
18
|
-
{{{ /if }}}
|
|
12
|
+
<component :is="'script'" defer
|
|
13
|
+
data-domain="yourdomain.com"
|
|
14
|
+
src="https://plausible.io/js/script.js" />
|
|
19
15
|
</template>
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
</script>
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
{{{! /* We are using the SquirrellyJS template syntax */ _}}}
|
|
3
|
-
|
|
4
1
|
<template>
|
|
5
2
|
<div class="layout">
|
|
6
3
|
<Sidebar>
|
|
@@ -8,11 +5,10 @@
|
|
|
8
5
|
<Link href="/">
|
|
9
6
|
Welcome
|
|
10
7
|
</Link>
|
|
11
|
-
|
|
8
|
+
<!-- import.meta.BATI_MODULES?.includes("telefunc") -->
|
|
12
9
|
<Link href="/todo">
|
|
13
10
|
Todo
|
|
14
11
|
</Link>
|
|
15
|
-
{{{ /if }}}
|
|
16
12
|
<Link href="/star-wars">
|
|
17
13
|
Data Fetching
|
|
18
14
|
</Link>
|
|
@@ -29,10 +25,11 @@ import Content from "../components/Content.vue";
|
|
|
29
25
|
</script>
|
|
30
26
|
|
|
31
27
|
<style>
|
|
32
|
-
{
|
|
33
|
-
|
|
28
|
+
/*{ @if (it.import.meta.BATI_MODULES?.includes("tailwindcss")) }*/
|
|
29
|
+
/* see https://stackoverflow.com/questions/55206901/how-to-import-css-files-in-vue-3-child-components */
|
|
30
|
+
@import "./tailwind.css";
|
|
31
|
+
/*{ /if }*/
|
|
34
32
|
|
|
35
|
-
{{{ /if }}}
|
|
36
33
|
body {
|
|
37
34
|
margin: 0;
|
|
38
35
|
font-family: sans-serif;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
{{{! /* We are using the SquirrellyJS template syntax */ _}}}
|
|
2
|
-
|
|
3
1
|
<template>
|
|
4
|
-
|
|
2
|
+
<!-- import.meta.BATI_MODULES?.includes("tailwindcss") -->
|
|
5
3
|
<h1 class="font-bold text-3xl pb-4">
|
|
6
|
-
|
|
4
|
+
My Vike app
|
|
5
|
+
</h1>
|
|
6
|
+
<!-- !import.meta.BATI_MODULES?.includes("tailwindcss") -->
|
|
7
7
|
<h1>
|
|
8
|
-
{{{ /if }}}
|
|
9
8
|
My Vike app
|
|
10
9
|
</h1>
|
|
11
10
|
This page is:
|
|
@@ -18,7 +17,8 @@
|
|
|
18
17
|
</template>
|
|
19
18
|
|
|
20
19
|
<script lang="ts">
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
import Counter from "../../components/Counter.vue";
|
|
21
|
+
|
|
22
|
+
const components = { Counter }
|
|
23
|
+
export default { components }
|
|
24
24
|
</script>
|
package/dist/index.js
CHANGED
|
@@ -450,9 +450,9 @@ async function runMain(cmd, opts = {}) {
|
|
|
450
450
|
|
|
451
451
|
// ../build/dist/index.js
|
|
452
452
|
import { existsSync } from "fs";
|
|
453
|
-
import {
|
|
453
|
+
import { mkdir, opendir, readFile, writeFile } from "fs/promises";
|
|
454
454
|
import path from "path";
|
|
455
|
-
import {
|
|
455
|
+
import { transformAndFormat } from "@batijs/core";
|
|
456
456
|
function queue() {
|
|
457
457
|
const tasks = [];
|
|
458
458
|
return {
|
|
@@ -474,13 +474,6 @@ function toDist(filepath, source, dist) {
|
|
|
474
474
|
split[split.length - 1] = split[split.length - 1].replace(/^\$\$?(.*)\.[tj]sx?$/, "$1");
|
|
475
475
|
return split.join(path.sep).replace(source, dist);
|
|
476
476
|
}
|
|
477
|
-
async function safeCopyFile(source, destination) {
|
|
478
|
-
const destinationDir = path.dirname(destination);
|
|
479
|
-
await mkdir(destinationDir, {
|
|
480
|
-
recursive: true
|
|
481
|
-
});
|
|
482
|
-
await copyFile(source, destination);
|
|
483
|
-
}
|
|
484
477
|
async function safeWriteFile(destination, content) {
|
|
485
478
|
const destinationDir = path.dirname(destination);
|
|
486
479
|
await mkdir(destinationDir, {
|
|
@@ -518,10 +511,6 @@ function transformFileAfterExec(filepath, fileContent) {
|
|
|
518
511
|
throw new Error(`Unsupported extension ${ext} (${filepath})`);
|
|
519
512
|
}
|
|
520
513
|
}
|
|
521
|
-
async function fileContainsBatiMeta(filepath) {
|
|
522
|
-
const code = await readFile(filepath, { encoding: "utf-8" });
|
|
523
|
-
return code.includes("import.meta.BATI_");
|
|
524
|
-
}
|
|
525
514
|
async function importTransformer(p) {
|
|
526
515
|
const importFile = isWin ? "file://" + p : p;
|
|
527
516
|
const f = await import(importFile);
|
|
@@ -563,33 +552,17 @@ Please report this issue to https://github.com/magne4000/bati`
|
|
|
563
552
|
targets.add(target);
|
|
564
553
|
}
|
|
565
554
|
});
|
|
566
|
-
} else
|
|
555
|
+
} else {
|
|
567
556
|
transformAndWriteQ.add(async () => {
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
filepath: p
|
|
573
|
-
});
|
|
574
|
-
} else {
|
|
575
|
-
const template = await readFile(p, { encoding: "utf-8" });
|
|
576
|
-
try {
|
|
577
|
-
fileContent = renderSquirrelly(template, meta);
|
|
578
|
-
} catch (e) {
|
|
579
|
-
console.error("SquirrellyJS error while rendering", p);
|
|
580
|
-
throw e;
|
|
581
|
-
}
|
|
582
|
-
}
|
|
557
|
+
const code = await readFile(p, { encoding: "utf-8" });
|
|
558
|
+
const fileContent = await transformAndFormat(code, meta, {
|
|
559
|
+
filepath: p
|
|
560
|
+
});
|
|
583
561
|
if (fileContent) {
|
|
584
562
|
await safeWriteFile(target, fileContent);
|
|
585
563
|
targets.add(target);
|
|
586
564
|
}
|
|
587
565
|
});
|
|
588
|
-
} else {
|
|
589
|
-
simpleCopyQ.add(async () => {
|
|
590
|
-
await safeCopyFile(p, target);
|
|
591
|
-
targets.add(target);
|
|
592
|
-
});
|
|
593
566
|
}
|
|
594
567
|
}
|
|
595
568
|
}
|
|
@@ -600,7 +573,7 @@ Please report this issue to https://github.com/magne4000/bati`
|
|
|
600
573
|
// package.json
|
|
601
574
|
var package_default = {
|
|
602
575
|
name: "@batijs/cli",
|
|
603
|
-
version: "0.0.
|
|
576
|
+
version: "0.0.95",
|
|
604
577
|
type: "module",
|
|
605
578
|
scripts: {
|
|
606
579
|
"check-types": "tsc --noEmit",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@batijs/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.95",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"description": "Next-gen scaffolder. Get started with fully-functional apps, and choose any tool you want",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"tsup": "^7.2.0",
|
|
20
20
|
"typescript": "^5.2.2",
|
|
21
21
|
"vite": "^4.4.11",
|
|
22
|
-
"@batijs/build": "0.0.
|
|
23
|
-
"@batijs/tsup": "0.0.
|
|
22
|
+
"@batijs/build": "0.0.95",
|
|
23
|
+
"@batijs/tsup": "0.0.95"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@batijs/core": "0.0.
|
|
27
|
-
"@batijs/features": "0.0.
|
|
26
|
+
"@batijs/core": "0.0.95",
|
|
27
|
+
"@batijs/features": "0.0.95"
|
|
28
28
|
},
|
|
29
29
|
"bin": "./dist/index.js",
|
|
30
30
|
"exports": {
|