create-absolutejs 0.2.2 → 0.3.1
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/commands/formatProject.d.ts +6 -0
- package/dist/commands/installDependencies.d.ts +6 -0
- package/dist/constants.d.ts +4 -0
- package/dist/data.d.ts +15 -0
- package/dist/generators/configurations/addConfigurationFiles.d.ts +7 -0
- package/dist/generators/configurations/generateDrizzleConfig.d.ts +7 -0
- package/dist/generators/configurations/generatePackageJson.d.ts +7 -0
- package/dist/generators/configurations/generatePrettierrc.d.ts +2 -0
- package/dist/generators/configurations/initializeRoot.d.ts +5 -0
- package/dist/generators/db/scaffoldDatabase.d.ts +9 -0
- package/dist/generators/html/scaffoldHTML.d.ts +6 -0
- package/dist/generators/htmx/scaffoldHTMX.d.ts +2 -0
- package/dist/generators/project/generateMarkupCSS.d.ts +1 -0
- package/dist/generators/project/generateServer.d.ts +7 -0
- package/dist/generators/project/scaffoldFrontends.d.ts +8 -0
- package/dist/generators/react/scaffoldReact.d.ts +2 -0
- package/dist/generators/svelte/scaffoldSvelte.d.ts +2 -0
- package/dist/generators/vue/scaffoldVue.d.ts +4 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +390 -447
- package/dist/messages.d.ts +14 -0
- package/dist/prompt.d.ts +2 -0
- package/dist/questions/authProvider.d.ts +1 -0
- package/dist/questions/codeQualityTool.d.ts +1 -0
- package/dist/questions/configurationType.d.ts +1 -0
- package/dist/questions/databaseEngine.d.ts +1 -0
- package/dist/questions/databaseHost.d.ts +2 -0
- package/dist/questions/directoryConfiguration.d.ts +14 -0
- package/dist/questions/frontendDirectoryConfigurations.d.ts +2 -0
- package/dist/questions/frontends.d.ts +1 -0
- package/dist/questions/htmlScriptingOption.d.ts +1 -0
- package/dist/questions/initializeGitNow.d.ts +1 -0
- package/dist/questions/installDependenciesNow.d.ts +1 -0
- package/dist/questions/orm.d.ts +1 -0
- package/dist/questions/plugins.d.ts +1 -0
- package/dist/questions/projectName.d.ts +1 -0
- package/dist/questions/useTailwind.d.ts +1 -0
- package/dist/scaffold.d.ts +8 -0
- package/dist/templates/assets/ico/favicon.ico +0 -0
- package/dist/templates/assets/png/absolutejs-temp.png +0 -0
- package/dist/templates/assets/svg/HTML5_Badge.svg +7 -0
- package/dist/templates/assets/svg/htmx-logo-black.svg +9 -0
- package/dist/templates/assets/svg/htmx-logo-white.svg +9 -0
- package/dist/templates/assets/svg/svelte-logo.svg +1 -0
- package/dist/templates/assets/svg/vue-logo.svg +4 -0
- package/dist/templates/html/pages/HTMLExample.html +66 -0
- package/dist/templates/html/scripts/typescript-example.ts +21 -0
- package/dist/templates/htmx/pages/HTMXExample.html +92 -0
- package/dist/templates/react/components/App.tsx +52 -0
- package/dist/templates/react/components/Dropdown.tsx +23 -0
- package/dist/templates/react/components/Head.tsx +34 -0
- package/dist/templates/react/pages/ReactExample.tsx +18 -0
- package/dist/templates/styles/colors.ts +11 -0
- package/dist/templates/styles/reset.css +84 -0
- package/dist/templates/svelte/components/Counter.svelte +19 -0
- package/dist/templates/svelte/composables/counter.svelte.ts +14 -0
- package/dist/templates/svelte/pages/SvelteExample.svelte +215 -0
- package/dist/templates/vue/components/CountButton.vue +39 -0
- package/dist/templates/vue/composables/useCount.ts +14 -0
- package/dist/templates/vue/pages/VueExample.vue +266 -0
- package/dist/typeGuards.d.ts +8 -0
- package/dist/types.d.ts +128 -0
- package/dist/utils/abort.d.ts +1 -0
- package/dist/utils/commandMaps.d.ts +2 -0
- package/dist/utils/getPackageVersion.d.ts +1 -0
- package/dist/utils/parseCommandLineOptions.d.ts +7 -0
- package/dist/utils/t3-utils.d.ts +7 -0
- package/package.json +7 -6
- package/dist/templates/react/hooks/useMediaQuery.ts +0 -54
- package/dist/templates/react/styles/defaultStyles.ts +0 -28
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
type SvelteExampleProps = {
|
|
3
|
+
initialCount: number;
|
|
4
|
+
cssPath: string;
|
|
5
|
+
};
|
|
6
|
+
import Counter from '../components/Counter.svelte';
|
|
7
|
+
|
|
8
|
+
let { initialCount, cssPath }: SvelteExampleProps = $props();
|
|
9
|
+
let isOpen = $state(false);
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<svelte:head>
|
|
13
|
+
<meta charset="utf-8" />
|
|
14
|
+
<title>AbsoluteJS + Svelte</title>
|
|
15
|
+
<meta name="description" content="AbsoluteJS Svelte Example" />
|
|
16
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
17
|
+
<link rel="icon" href="/assets/ico/favicon.ico" />
|
|
18
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
19
|
+
<link
|
|
20
|
+
rel="preconnect"
|
|
21
|
+
href="https://fonts.gstatic.com"
|
|
22
|
+
crossOrigin="anonymous"
|
|
23
|
+
/>
|
|
24
|
+
<link
|
|
25
|
+
href={`https://fonts.googleapis.com/css2?family=Poppins:wght@100..900&display=swap`}
|
|
26
|
+
rel="stylesheet"
|
|
27
|
+
/>
|
|
28
|
+
<link rel="stylesheet" href={cssPath} type="text/css" />
|
|
29
|
+
</svelte:head>
|
|
30
|
+
|
|
31
|
+
<header>
|
|
32
|
+
<a href="/">AbsoluteJS</a>
|
|
33
|
+
<details
|
|
34
|
+
open={isOpen}
|
|
35
|
+
onpointerenter={() => (isOpen = true)}
|
|
36
|
+
onpointerleave={() => (isOpen = false)}
|
|
37
|
+
>
|
|
38
|
+
<summary>Pages</summary>
|
|
39
|
+
<nav>
|
|
40
|
+
<a href="/html">HTML</a>
|
|
41
|
+
<a href="/react">React</a>
|
|
42
|
+
<a href="/htmx">HTMX</a>
|
|
43
|
+
<a href="/svelte">Svelte</a>
|
|
44
|
+
<a href="/vue">Vue</a>
|
|
45
|
+
<a href="/angular">Angular</a>
|
|
46
|
+
</nav>
|
|
47
|
+
</details>
|
|
48
|
+
</header>
|
|
49
|
+
|
|
50
|
+
<main>
|
|
51
|
+
<nav>
|
|
52
|
+
<a href="https://absolutejs.com" target="_blank">
|
|
53
|
+
<img
|
|
54
|
+
class="logo"
|
|
55
|
+
src="/assets/png/absolutejs-temp.png"
|
|
56
|
+
alt="AbsoluteJS Logo"
|
|
57
|
+
/>
|
|
58
|
+
</a>
|
|
59
|
+
<a href="https://svelte.dev" target="_blank">
|
|
60
|
+
<img
|
|
61
|
+
class="logo svelte"
|
|
62
|
+
src="/assets/svg/svelte-logo.svg"
|
|
63
|
+
alt="Svelte Logo"
|
|
64
|
+
/>
|
|
65
|
+
</a>
|
|
66
|
+
</nav>
|
|
67
|
+
<h1>AbsoluteJS + Svelte</h1>
|
|
68
|
+
<Counter {initialCount} />
|
|
69
|
+
<p>
|
|
70
|
+
Edit <code>example/svelte/pages/SvelteExample.svelte</code> then save and
|
|
71
|
+
refresh to update the page.
|
|
72
|
+
</p>
|
|
73
|
+
<p style="color: #777">( Hot Module Reloading is coming soon )</p>
|
|
74
|
+
<p style="margin-top: 2rem;">
|
|
75
|
+
Explore the other pages to see how AbsoluteJS seamlessly unifies
|
|
76
|
+
multiple frameworks on a single server.
|
|
77
|
+
</p>
|
|
78
|
+
<p style="color: #777; font-size: 1rem; margin-top: 2rem;">
|
|
79
|
+
Click on the AbsoluteJS and Svelte logos to learn more.
|
|
80
|
+
</p>
|
|
81
|
+
</main>
|
|
82
|
+
|
|
83
|
+
<style>
|
|
84
|
+
header {
|
|
85
|
+
align-items: center;
|
|
86
|
+
background-color: #1a1a1a;
|
|
87
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
88
|
+
display: flex;
|
|
89
|
+
justify-content: space-between;
|
|
90
|
+
padding: 2rem;
|
|
91
|
+
text-align: center;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
header a {
|
|
95
|
+
position: relative;
|
|
96
|
+
color: #5fbeeb;
|
|
97
|
+
text-decoration: none;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
header a::after {
|
|
101
|
+
content: '';
|
|
102
|
+
position: absolute;
|
|
103
|
+
left: 0;
|
|
104
|
+
bottom: 0;
|
|
105
|
+
width: 100%;
|
|
106
|
+
height: 2px;
|
|
107
|
+
background: linear-gradient(
|
|
108
|
+
90deg,
|
|
109
|
+
#5fbeeb 0%,
|
|
110
|
+
#35d5a2 50%,
|
|
111
|
+
#ff4b91 100%
|
|
112
|
+
);
|
|
113
|
+
transform: scaleX(0);
|
|
114
|
+
transform-origin: left;
|
|
115
|
+
transition: transform 0.25s ease-in-out;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
header a:hover::after {
|
|
119
|
+
transform: scaleX(1);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
h1 {
|
|
123
|
+
font-size: 2.5rem;
|
|
124
|
+
margin-top: 2rem;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.logo {
|
|
128
|
+
height: 8rem;
|
|
129
|
+
width: 8rem;
|
|
130
|
+
will-change: filter;
|
|
131
|
+
transition: filter 300ms;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.logo:hover {
|
|
135
|
+
filter: drop-shadow(0 0 2rem #5fbeeb);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.logo.svelte:hover {
|
|
139
|
+
filter: drop-shadow(0 0 2rem #ff3e00);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
nav {
|
|
143
|
+
display: flex;
|
|
144
|
+
gap: 4rem;
|
|
145
|
+
justify-content: center;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
header details {
|
|
149
|
+
position: relative;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
header details summary {
|
|
153
|
+
list-style: none;
|
|
154
|
+
appearance: none;
|
|
155
|
+
-webkit-appearance: none;
|
|
156
|
+
cursor: pointer;
|
|
157
|
+
user-select: none;
|
|
158
|
+
color: #5fbeeb;
|
|
159
|
+
font-size: 1.5rem;
|
|
160
|
+
font-weight: 500;
|
|
161
|
+
padding: 0.5rem 1rem;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
header summary::after {
|
|
165
|
+
content: '▼';
|
|
166
|
+
display: inline-block;
|
|
167
|
+
margin-left: 0.5rem;
|
|
168
|
+
font-size: 0.75rem;
|
|
169
|
+
transition: transform 0.3s ease;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
header details[open] summary::after {
|
|
173
|
+
transform: rotate(180deg);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
header details nav {
|
|
177
|
+
position: absolute;
|
|
178
|
+
top: 100%;
|
|
179
|
+
right: -0.5rem;
|
|
180
|
+
display: flex;
|
|
181
|
+
flex-direction: column;
|
|
182
|
+
gap: 0.75rem;
|
|
183
|
+
background: rgba(185, 185, 185, 0.1);
|
|
184
|
+
backdrop-filter: blur(4px);
|
|
185
|
+
border: 1px solid #5fbeeb;
|
|
186
|
+
border-radius: 1rem;
|
|
187
|
+
padding: 1rem 1.5rem;
|
|
188
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
|
|
189
|
+
opacity: 0;
|
|
190
|
+
transform: translateY(-8px);
|
|
191
|
+
pointer-events: none;
|
|
192
|
+
transition:
|
|
193
|
+
opacity 0.3s ease,
|
|
194
|
+
transform 0.3s ease;
|
|
195
|
+
z-index: 1000;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
header details[open] nav {
|
|
199
|
+
opacity: 1;
|
|
200
|
+
transform: translateY(0);
|
|
201
|
+
pointer-events: auto;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
header details nav a {
|
|
205
|
+
font-size: 1.1rem;
|
|
206
|
+
padding: 0.25rem 0;
|
|
207
|
+
white-space: nowrap;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@media (prefers-color-scheme: light) {
|
|
211
|
+
header {
|
|
212
|
+
background-color: #ffffff;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
</style>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useCount } from '../composables/useCount';
|
|
3
|
+
|
|
4
|
+
const props = defineProps<{ initialCount: number }>();
|
|
5
|
+
const { count, increment } = useCount(props.initialCount);
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<button @click="increment">count is {{ count }}</button>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<style scoped>
|
|
13
|
+
button {
|
|
14
|
+
background-color: #1a1a1a;
|
|
15
|
+
border: 1px solid transparent;
|
|
16
|
+
border-radius: 0.5rem;
|
|
17
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
font-family: inherit;
|
|
20
|
+
font-size: 1.1rem;
|
|
21
|
+
font-weight: 500;
|
|
22
|
+
margin: 2rem 0;
|
|
23
|
+
padding: 0.6rem 1.2rem;
|
|
24
|
+
transition: border-color 0.25s;
|
|
25
|
+
}
|
|
26
|
+
button:hover {
|
|
27
|
+
border-color: #5fbeeb;
|
|
28
|
+
}
|
|
29
|
+
button:focus,
|
|
30
|
+
button:focus-visible {
|
|
31
|
+
outline: 4px auto -webkit-focus-ring-color;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media (prefers-color-scheme: light) {
|
|
35
|
+
button {
|
|
36
|
+
background-color: #ffffff;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
</style>
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue';
|
|
3
|
+
import CountButton from '../components/CountButton.vue';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
initialCount: number;
|
|
7
|
+
}>();
|
|
8
|
+
|
|
9
|
+
const count = ref(props.initialCount);
|
|
10
|
+
const isOpen = ref(false);
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<header>
|
|
15
|
+
<a href="/">AbsoluteJS</a>
|
|
16
|
+
<details
|
|
17
|
+
:open="isOpen"
|
|
18
|
+
@pointerenter="isOpen = true"
|
|
19
|
+
@pointerleave="isOpen = false"
|
|
20
|
+
>
|
|
21
|
+
<summary>Pages</summary>
|
|
22
|
+
<nav>
|
|
23
|
+
<a href="/html">HTML</a>
|
|
24
|
+
<a href="/react">React</a>
|
|
25
|
+
<a href="/htmx">HTMX</a>
|
|
26
|
+
<a href="/svelte">Svelte</a>
|
|
27
|
+
<a href="/vue">Vue</a>
|
|
28
|
+
<a href="/angular">Angular</a>
|
|
29
|
+
</nav>
|
|
30
|
+
</details>
|
|
31
|
+
</header>
|
|
32
|
+
|
|
33
|
+
<main>
|
|
34
|
+
<nav>
|
|
35
|
+
<a href="https://absolutejs.com" target="_blank">
|
|
36
|
+
<img
|
|
37
|
+
class="logo"
|
|
38
|
+
src="/assets/png/absolutejs-temp.png"
|
|
39
|
+
alt="AbsoluteJS Logo"
|
|
40
|
+
/>
|
|
41
|
+
</a>
|
|
42
|
+
<a href="https://vuejs.org" target="_blank">
|
|
43
|
+
<img
|
|
44
|
+
class="logo vue"
|
|
45
|
+
src="/assets/svg/vue-logo.svg"
|
|
46
|
+
alt="Vue Logo"
|
|
47
|
+
/>
|
|
48
|
+
</a>
|
|
49
|
+
</nav>
|
|
50
|
+
<h1>AbsoluteJS + Vue</h1>
|
|
51
|
+
<CountButton :initialCount="count" />
|
|
52
|
+
<p>
|
|
53
|
+
Edit <code>example/vue/pages/VueExample.vue</code> then save and
|
|
54
|
+
refresh to update the page.
|
|
55
|
+
</p>
|
|
56
|
+
<p style="color: #777">( Hot Module Reloading is coming soon )</p>
|
|
57
|
+
<p style="margin-top: 2rem">
|
|
58
|
+
Explore the other pages to see how AbsoluteJS seamlessly unifies
|
|
59
|
+
multiple frameworks on a single server.
|
|
60
|
+
</p>
|
|
61
|
+
<p style="color: #777; font-size: 1rem; margin-top: 2rem">
|
|
62
|
+
Click on the AbsoluteJS and Vue logos to learn more.
|
|
63
|
+
</p>
|
|
64
|
+
</main>
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
<style scoped>
|
|
68
|
+
:global(*) {
|
|
69
|
+
box-sizing: border-box;
|
|
70
|
+
line-height: 1.5;
|
|
71
|
+
margin: 0;
|
|
72
|
+
padding: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:global(html) {
|
|
76
|
+
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
77
|
+
height: 100%;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:global(body) {
|
|
81
|
+
background-color: #2c2c2c;
|
|
82
|
+
color: #f5f5f5;
|
|
83
|
+
color-scheme: light dark;
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
font-synthesis: none;
|
|
87
|
+
font-weight: 400;
|
|
88
|
+
height: 100%;
|
|
89
|
+
-moz-osx-font-smoothing: grayscale;
|
|
90
|
+
text-rendering: optimizeLegibility;
|
|
91
|
+
-webkit-font-smoothing: antialiased;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
:global(#root) {
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
margin: 0 auto;
|
|
98
|
+
height: 100%;
|
|
99
|
+
width: 100%;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
:global(main) {
|
|
103
|
+
align-items: center;
|
|
104
|
+
display: flex;
|
|
105
|
+
flex: 1;
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
text-align: center;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
:global(h1),
|
|
112
|
+
:global(h2),
|
|
113
|
+
:global(h3),
|
|
114
|
+
:global(h4),
|
|
115
|
+
:global(h5),
|
|
116
|
+
:global(h6) {
|
|
117
|
+
line-height: 1.1;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
:global(p) {
|
|
121
|
+
font-size: 1.2rem;
|
|
122
|
+
max-width: 1280px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
a {
|
|
126
|
+
color: #5fbeeb;
|
|
127
|
+
font-size: 1.5rem;
|
|
128
|
+
font-weight: 500;
|
|
129
|
+
position: relative;
|
|
130
|
+
text-decoration: none;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
header {
|
|
134
|
+
align-items: center;
|
|
135
|
+
background-color: #1a1a1a;
|
|
136
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
137
|
+
display: flex;
|
|
138
|
+
justify-content: space-between;
|
|
139
|
+
padding: 2rem;
|
|
140
|
+
text-align: center;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
header a {
|
|
144
|
+
position: relative;
|
|
145
|
+
color: #5fbeeb;
|
|
146
|
+
text-decoration: none;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
header a::after {
|
|
150
|
+
content: '';
|
|
151
|
+
position: absolute;
|
|
152
|
+
left: 0;
|
|
153
|
+
bottom: 0;
|
|
154
|
+
width: 100%;
|
|
155
|
+
height: 2px;
|
|
156
|
+
background: linear-gradient(90deg, #5fbeeb 0%, #35d5a2 50%, #ff4b91 100%);
|
|
157
|
+
transform: scaleX(0);
|
|
158
|
+
transform-origin: left;
|
|
159
|
+
transition: transform 0.25s ease-in-out;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
header a:hover::after {
|
|
163
|
+
transform: scaleX(1);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
h1 {
|
|
167
|
+
font-size: 2.5rem;
|
|
168
|
+
margin-top: 2rem;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.logo {
|
|
172
|
+
height: 8rem;
|
|
173
|
+
width: 8rem;
|
|
174
|
+
will-change: filter;
|
|
175
|
+
transition: filter 300ms;
|
|
176
|
+
}
|
|
177
|
+
.logo:hover {
|
|
178
|
+
filter: drop-shadow(0 0 2rem #5fbeeb);
|
|
179
|
+
}
|
|
180
|
+
.logo.vue:hover {
|
|
181
|
+
filter: drop-shadow(0 0 2rem #42b883);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
nav {
|
|
185
|
+
display: flex;
|
|
186
|
+
gap: 4rem;
|
|
187
|
+
justify-content: center;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
header details {
|
|
191
|
+
position: relative;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
header details summary {
|
|
195
|
+
list-style: none;
|
|
196
|
+
appearance: none;
|
|
197
|
+
-webkit-appearance: none;
|
|
198
|
+
cursor: pointer;
|
|
199
|
+
user-select: none;
|
|
200
|
+
color: #5fbeeb;
|
|
201
|
+
font-size: 1.5rem;
|
|
202
|
+
font-weight: 500;
|
|
203
|
+
padding: 0.5rem 1rem;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
header summary::after {
|
|
207
|
+
content: '▼';
|
|
208
|
+
display: inline-block;
|
|
209
|
+
margin-left: 0.5rem;
|
|
210
|
+
font-size: 0.75rem;
|
|
211
|
+
transition: transform 0.3s ease;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
header details[open] summary::after {
|
|
215
|
+
transform: rotate(180deg);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
header details nav {
|
|
219
|
+
position: absolute;
|
|
220
|
+
top: 100%;
|
|
221
|
+
right: -0.5rem;
|
|
222
|
+
display: flex;
|
|
223
|
+
flex-direction: column;
|
|
224
|
+
gap: 0.75rem;
|
|
225
|
+
background: rgba(128, 128, 128, 0.15);
|
|
226
|
+
backdrop-filter: blur(4px);
|
|
227
|
+
border: 1px solid #5fbeeb;
|
|
228
|
+
border-radius: 1rem;
|
|
229
|
+
padding: 1rem 1.5rem;
|
|
230
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
|
|
231
|
+
opacity: 0;
|
|
232
|
+
transform: translateY(-8px);
|
|
233
|
+
pointer-events: none;
|
|
234
|
+
transition:
|
|
235
|
+
opacity 0.3s ease,
|
|
236
|
+
transform 0.3s ease;
|
|
237
|
+
z-index: 1000;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
header details[open] nav {
|
|
241
|
+
opacity: 1;
|
|
242
|
+
transform: translateY(0);
|
|
243
|
+
pointer-events: auto;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
header details nav a {
|
|
247
|
+
font-size: 1.1rem;
|
|
248
|
+
padding: 0.25rem 0;
|
|
249
|
+
white-space: nowrap;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
@media (prefers-color-scheme: light) {
|
|
253
|
+
:global(body) {
|
|
254
|
+
background-color: #f5f5f5;
|
|
255
|
+
color: #1a1a1a;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
header {
|
|
259
|
+
background-color: #ffffff;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
button {
|
|
263
|
+
background-color: #ffffff;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
</style>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AuthProvider, CodeQualityTool, DatabaseEngine, DatabaseHost, Frontend, ORM } from './types';
|
|
2
|
+
export declare const isAuthProvider: (value: string | undefined) => value is AuthProvider;
|
|
3
|
+
export declare const isDirectoryConfig: (value: string) => value is "default" | "custom";
|
|
4
|
+
export declare const isDatabaseEngine: (value: string | undefined) => value is DatabaseEngine;
|
|
5
|
+
export declare const isDatabaseHost: (value: string | undefined) => value is DatabaseHost;
|
|
6
|
+
export declare const isORM: (value: string | undefined) => value is ORM;
|
|
7
|
+
export declare const isCodeQualityTool: (value: string | undefined) => value is CodeQualityTool;
|
|
8
|
+
export declare const isFrontend: (value: string | undefined) => value is Frontend;
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { availableAuthProviders, availableCodeQualityTools, availableDatabaseEngines, availableDatabaseHosts, availableDirectoryConfigurations, availableFrontends, availableORMs } from './data';
|
|
2
|
+
export type ScaffoldFrontendProps = {
|
|
3
|
+
targetDirectory: string;
|
|
4
|
+
templatesDirectory: string;
|
|
5
|
+
projectAssetsDirectory: string;
|
|
6
|
+
isSingleFrontend: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type Frontend = (typeof availableFrontends)[number];
|
|
9
|
+
export type FrontendLabels = Record<Frontend, string>;
|
|
10
|
+
export type FrontendDirectories = Partial<Record<Frontend, string>>;
|
|
11
|
+
export type ImportEntry = {
|
|
12
|
+
packageName: string;
|
|
13
|
+
isPlugin: boolean;
|
|
14
|
+
config?: Record<string, unknown> | null;
|
|
15
|
+
};
|
|
16
|
+
export type AvailableDependency = {
|
|
17
|
+
value: string;
|
|
18
|
+
label?: string;
|
|
19
|
+
imports?: ImportEntry[];
|
|
20
|
+
latestVersion: string;
|
|
21
|
+
};
|
|
22
|
+
export type PackageManager = 'npm' | 'pnpm' | 'yarn' | 'bun';
|
|
23
|
+
export type AuthProvider = (typeof availableAuthProviders)[number] | undefined;
|
|
24
|
+
export type DatabaseEngine = (typeof availableDatabaseEngines)[number] | undefined;
|
|
25
|
+
export type DatabaseHost = (typeof availableDatabaseHosts)[number] | undefined;
|
|
26
|
+
export type DirectoryConfiguration = (typeof availableDirectoryConfigurations)[number];
|
|
27
|
+
export type ORM = (typeof availableORMs)[number] | undefined;
|
|
28
|
+
export type CodeQualityTool = (typeof availableCodeQualityTools)[number];
|
|
29
|
+
export type TailwindConfig = {
|
|
30
|
+
input: string;
|
|
31
|
+
output: string;
|
|
32
|
+
} | undefined;
|
|
33
|
+
export type CreateConfiguration = {
|
|
34
|
+
assetsDirectory: string;
|
|
35
|
+
authProvider: AuthProvider;
|
|
36
|
+
buildDirectory: string;
|
|
37
|
+
directoryConfig: DirectoryConfiguration;
|
|
38
|
+
databaseEngine: DatabaseEngine;
|
|
39
|
+
frontendDirectories: FrontendDirectories;
|
|
40
|
+
frontends: Frontend[];
|
|
41
|
+
useHTMLScripts: boolean;
|
|
42
|
+
initializeGitNow: boolean;
|
|
43
|
+
installDependenciesNow: boolean;
|
|
44
|
+
codeQualityTool: CodeQualityTool;
|
|
45
|
+
orm: ORM;
|
|
46
|
+
plugins: string[];
|
|
47
|
+
projectName: string;
|
|
48
|
+
tailwind: TailwindConfig;
|
|
49
|
+
useTailwind: boolean;
|
|
50
|
+
databaseDirectory: string | undefined;
|
|
51
|
+
databaseHost: DatabaseHost;
|
|
52
|
+
};
|
|
53
|
+
type DeepUndefined<T> = T extends object ? {
|
|
54
|
+
[P in keyof T]: DeepUndefined<T[P]> | undefined;
|
|
55
|
+
} : T | undefined;
|
|
56
|
+
export type ArgumentConfiguration = {
|
|
57
|
+
[K in keyof CreateConfiguration]: DeepUndefined<CreateConfiguration[K]> | undefined;
|
|
58
|
+
};
|
|
59
|
+
export type PackageJson = {
|
|
60
|
+
name: string;
|
|
61
|
+
version: string;
|
|
62
|
+
description?: string;
|
|
63
|
+
keywords?: string[];
|
|
64
|
+
main?: string;
|
|
65
|
+
module?: string;
|
|
66
|
+
browser?: string | Record<string, string>;
|
|
67
|
+
types?: string;
|
|
68
|
+
typings?: string;
|
|
69
|
+
exports?: string | Record<string, string | Record<string, string>>;
|
|
70
|
+
imports?: Record<string, string>;
|
|
71
|
+
bin?: string | Record<string, string>;
|
|
72
|
+
files?: string[];
|
|
73
|
+
scripts?: Record<string, string>;
|
|
74
|
+
private?: boolean;
|
|
75
|
+
publishConfig?: {
|
|
76
|
+
registry?: string;
|
|
77
|
+
[key: string]: unknown;
|
|
78
|
+
};
|
|
79
|
+
dependencies?: Record<string, string>;
|
|
80
|
+
devDependencies?: Record<string, string>;
|
|
81
|
+
peerDependencies?: Record<string, string>;
|
|
82
|
+
optionalDependencies?: Record<string, string>;
|
|
83
|
+
bundledDependencies?: string[];
|
|
84
|
+
bundleDependencies?: string[];
|
|
85
|
+
engines?: {
|
|
86
|
+
node?: string;
|
|
87
|
+
npm?: string;
|
|
88
|
+
[key: string]: string | undefined;
|
|
89
|
+
};
|
|
90
|
+
os?: string[];
|
|
91
|
+
cpu?: string[];
|
|
92
|
+
workspaces?: string[] | {
|
|
93
|
+
packages: string[];
|
|
94
|
+
nohoist?: string[];
|
|
95
|
+
};
|
|
96
|
+
repository?: string | {
|
|
97
|
+
type?: 'git' | string;
|
|
98
|
+
url: string;
|
|
99
|
+
directory?: string;
|
|
100
|
+
};
|
|
101
|
+
bugs?: string | {
|
|
102
|
+
url?: string;
|
|
103
|
+
email?: string;
|
|
104
|
+
};
|
|
105
|
+
homepage?: string;
|
|
106
|
+
author?: string | {
|
|
107
|
+
name: string;
|
|
108
|
+
email?: string;
|
|
109
|
+
url?: string;
|
|
110
|
+
};
|
|
111
|
+
contributors?: Array<string | {
|
|
112
|
+
name: string;
|
|
113
|
+
email?: string;
|
|
114
|
+
url?: string;
|
|
115
|
+
}>;
|
|
116
|
+
license?: string;
|
|
117
|
+
funding?: string | Array<{
|
|
118
|
+
type?: string;
|
|
119
|
+
url: string;
|
|
120
|
+
}>;
|
|
121
|
+
preferGlobal?: boolean;
|
|
122
|
+
sideEffects?: boolean | string[];
|
|
123
|
+
config?: Record<string, unknown>;
|
|
124
|
+
resolution?: Record<string, string>;
|
|
125
|
+
resolutions?: Record<string, string>;
|
|
126
|
+
[customField: string]: unknown;
|
|
127
|
+
};
|
|
128
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function abort(): never;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getPackageVersion: (packageName: string) => string | null;
|