create-nxpress-app 1.0.8 → 1.1.3
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/index.js +11 -5
- package/package.json +1 -1
- package/templates/app/index.liquid +82 -0
- package/templates/app/index.njk +82 -0
- package/templates/app/layout.html +25 -0
- package/templates/app/layout.liquid +26 -0
- package/templates/app/layout.njk +26 -0
package/dist/index.js
CHANGED
|
@@ -86,16 +86,22 @@ program
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
let engine = options.engine;
|
|
89
|
-
if (!engine || !["handlebars", "
|
|
89
|
+
if (!engine || !["ejs", "handlebars", "nunjucks", "liquid", "html"].includes(engine)) {
|
|
90
90
|
const selectedEngine = await (0, prompts_1.select)({
|
|
91
91
|
message: "Which template engine do you want to use?",
|
|
92
92
|
options: [
|
|
93
|
+
{
|
|
94
|
+
value: "ejs",
|
|
95
|
+
label: "EJS (Eta) (Default)",
|
|
96
|
+
hint: "Fast EJS syntax powered by Eta engine",
|
|
97
|
+
},
|
|
93
98
|
{
|
|
94
99
|
value: "handlebars",
|
|
95
|
-
label: "Handlebars
|
|
100
|
+
label: "Handlebars",
|
|
96
101
|
hint: "Clean syntax & partials",
|
|
97
102
|
},
|
|
98
|
-
{ value: "
|
|
103
|
+
{ value: "nunjucks", label: "Nunjucks", hint: "Jinja2-inspired template engine" },
|
|
104
|
+
{ value: "liquid", label: "LiquidJS", hint: "Secure Shopify-style templates" },
|
|
99
105
|
{ value: "html", label: "HTML", hint: "Plain HTML templates" },
|
|
100
106
|
],
|
|
101
107
|
});
|
|
@@ -222,7 +228,7 @@ program
|
|
|
222
228
|
fs_extra_1.default.ensureDirSync(componentsDir);
|
|
223
229
|
fs_extra_1.default.ensureDirSync(publicDir);
|
|
224
230
|
const templatesDir = path_1.default.resolve(__dirname, "..", "templates");
|
|
225
|
-
const ext = engine === "handlebars" ? "hbs" : engine;
|
|
231
|
+
const ext = engine === "handlebars" ? "hbs" : (engine === "nunjucks" ? "njk" : engine);
|
|
226
232
|
// Copy public assets (e.g., logo.png)
|
|
227
233
|
const templatePublicDir = path_1.default.join(templatesDir, "public");
|
|
228
234
|
if (fs_extra_1.default.existsSync(templatePublicDir)) {
|
|
@@ -237,7 +243,7 @@ program
|
|
|
237
243
|
const indexTemplatePath = path_1.default.join(templatesDir, "app", `index.${ext}`);
|
|
238
244
|
if (fs_extra_1.default.existsSync(indexTemplatePath)) {
|
|
239
245
|
let content = fs_extra_1.default.readFileSync(indexTemplatePath, "utf8");
|
|
240
|
-
content = content.replace(/app\/index\.(hbs|ejs|html)/g, `${appDirName}/index.${ext}`);
|
|
246
|
+
content = content.replace(/app\/index\.(hbs|ejs|html|njk|liquid)/g, `${appDirName}/index.${ext}`);
|
|
241
247
|
fs_extra_1.default.writeFileSync(path_1.default.join(appDir, `index.${ext}`), content);
|
|
242
248
|
}
|
|
243
249
|
// Data loader for index page
|
package/package.json
CHANGED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<div class="min-h-screen flex flex-col justify-between max-w-6xl mx-auto px-6 py-8">
|
|
2
|
+
<header class="flex items-center justify-between py-4 border-b border-slate-800/80">
|
|
3
|
+
<div class="flex items-center gap-3">
|
|
4
|
+
<span class="font-bold text-lg text-slate-100 tracking-tight">Nxpress</span>
|
|
5
|
+
<span class="text-xs font-mono px-2 py-0.5 rounded-full bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 font-medium">
|
|
6
|
+
v{{ version }}
|
|
7
|
+
</span>
|
|
8
|
+
</div>
|
|
9
|
+
{% if E.NODE_ENV != 'production' %}
|
|
10
|
+
<div class="flex items-center gap-2">
|
|
11
|
+
<span class="inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium bg-emerald-500/10 text-emerald-400 border border-emerald-500/20">
|
|
12
|
+
<span class="w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"></span>
|
|
13
|
+
Dev Server Active
|
|
14
|
+
</span>
|
|
15
|
+
</div>
|
|
16
|
+
{% endif %}
|
|
17
|
+
</header>
|
|
18
|
+
|
|
19
|
+
<main class="py-16 md:py-24 text-center my-auto">
|
|
20
|
+
<div class="flex justify-center mb-6">
|
|
21
|
+
<img src="/logo.png" alt="Nxpress" class="w-16 h-16 sm:w-20 sm:h-20 object-contain drop-shadow-[0_0_25px_rgba(99,102,241,0.5)] transition-transform hover:scale-105 duration-300" />
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<h1 class="text-4xl sm:text-6xl md:text-7xl font-extrabold tracking-tight text-white mb-6 max-w-4xl mx-auto leading-[1.1]">
|
|
25
|
+
Build fast Node apps with
|
|
26
|
+
<span class="bg-linear-to-r from-indigo-400 via-sky-400 to-cyan-300 bg-clip-text text-transparent">
|
|
27
|
+
{{ title }}
|
|
28
|
+
</span>
|
|
29
|
+
</h1>
|
|
30
|
+
|
|
31
|
+
<p class="text-lg sm:text-xl text-slate-400 max-w-2xl mx-auto mb-10 leading-relaxed">
|
|
32
|
+
{{ description }}
|
|
33
|
+
</p>
|
|
34
|
+
|
|
35
|
+
<div class="max-w-xl mx-auto mb-16">
|
|
36
|
+
<div class="group relative rounded-2xl bg-linear-to-b from-slate-800/80 to-slate-900/90 border border-slate-700/80 p-5 shadow-2xl backdrop-blur-md transition-all hover:border-indigo-500/40">
|
|
37
|
+
<div class="flex items-center justify-between mb-3 text-xs text-slate-400 font-mono border-b border-slate-800 pb-3">
|
|
38
|
+
<div class="flex items-center gap-2">
|
|
39
|
+
<span class="w-3 h-3 rounded-full bg-rose-500/80 inline-block"></span>
|
|
40
|
+
<span class="w-3 h-3 rounded-full bg-amber-500/80 inline-block"></span>
|
|
41
|
+
<span class="w-3 h-3 rounded-full bg-emerald-500/80 inline-block"></span>
|
|
42
|
+
<span class="ml-2 text-slate-500">app/index.liquid</span>
|
|
43
|
+
</div>
|
|
44
|
+
<span class="text-indigo-400 font-sans text-[11px] font-semibold tracking-wide uppercase">Quick Start</span>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="text-left font-mono text-sm py-2">
|
|
47
|
+
<p class="text-slate-300">
|
|
48
|
+
<span class="text-purple-400">Edit</span>
|
|
49
|
+
<span class="text-emerald-300 px-1.5 py-0.5 rounded bg-slate-800 border border-slate-700">app/index.liquid</span>
|
|
50
|
+
<span class="text-slate-400">to customize this page.</span>
|
|
51
|
+
</p>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 max-w-4xl mx-auto text-left">
|
|
57
|
+
{% for feat in features %}
|
|
58
|
+
<div class="p-6 rounded-2xl bg-slate-900/50 border border-slate-800/80 hover:border-slate-700 transition-all duration-200 group">
|
|
59
|
+
<div class="flex items-center justify-between mb-3">
|
|
60
|
+
<span class="text-xs font-semibold px-2.5 py-1 rounded-md bg-slate-800 text-indigo-400 border border-slate-700/50">
|
|
61
|
+
{{ feat.tag }}
|
|
62
|
+
</span>
|
|
63
|
+
<span class="text-slate-600 group-hover:text-slate-400 transition-colors text-sm">→</span>
|
|
64
|
+
</div>
|
|
65
|
+
<h3 class="text-base font-bold text-slate-100 mb-1.5 group-hover:text-indigo-300 transition-colors">
|
|
66
|
+
{{ feat.title }}
|
|
67
|
+
</h3>
|
|
68
|
+
<p class="text-sm text-slate-400 leading-relaxed">
|
|
69
|
+
{{ feat.desc }}
|
|
70
|
+
</p>
|
|
71
|
+
</div>
|
|
72
|
+
{% endfor %}
|
|
73
|
+
</div>
|
|
74
|
+
</main>
|
|
75
|
+
|
|
76
|
+
<footer class="py-6 border-t border-slate-800/60 text-center text-xs text-slate-500 flex flex-col sm:flex-row items-center justify-between gap-3">
|
|
77
|
+
<p>Powered by <span class="text-slate-300 font-medium">Nxpress</span></p>
|
|
78
|
+
<p class="font-mono text-slate-600">
|
|
79
|
+
{{ R.base }}
|
|
80
|
+
</p>
|
|
81
|
+
</footer>
|
|
82
|
+
</div>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<div class="min-h-screen flex flex-col justify-between max-w-6xl mx-auto px-6 py-8">
|
|
2
|
+
<header class="flex items-center justify-between py-4 border-b border-slate-800/80">
|
|
3
|
+
<div class="flex items-center gap-3">
|
|
4
|
+
<span class="font-bold text-lg text-slate-100 tracking-tight">Nxpress</span>
|
|
5
|
+
<span class="text-xs font-mono px-2 py-0.5 rounded-full bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 font-medium">
|
|
6
|
+
v{{ version }}
|
|
7
|
+
</span>
|
|
8
|
+
</div>
|
|
9
|
+
{% if not E.NODE_ENV or E.NODE_ENV != 'production' %}
|
|
10
|
+
<div class="flex items-center gap-2">
|
|
11
|
+
<span class="inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium bg-emerald-500/10 text-emerald-400 border border-emerald-500/20">
|
|
12
|
+
<span class="w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"></span>
|
|
13
|
+
Dev Server Active
|
|
14
|
+
</span>
|
|
15
|
+
</div>
|
|
16
|
+
{% endif %}
|
|
17
|
+
</header>
|
|
18
|
+
|
|
19
|
+
<main class="py-16 md:py-24 text-center my-auto">
|
|
20
|
+
<div class="flex justify-center mb-6">
|
|
21
|
+
<img src="/logo.png" alt="Nxpress" class="w-16 h-16 sm:w-20 sm:h-20 object-contain drop-shadow-[0_0_25px_rgba(99,102,241,0.5)] transition-transform hover:scale-105 duration-300" />
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<h1 class="text-4xl sm:text-6xl md:text-7xl font-extrabold tracking-tight text-white mb-6 max-w-4xl mx-auto leading-[1.1]">
|
|
25
|
+
Build fast Node apps with
|
|
26
|
+
<span class="bg-linear-to-r from-indigo-400 via-sky-400 to-cyan-300 bg-clip-text text-transparent">
|
|
27
|
+
{{ title }}
|
|
28
|
+
</span>
|
|
29
|
+
</h1>
|
|
30
|
+
|
|
31
|
+
<p class="text-lg sm:text-xl text-slate-400 max-w-2xl mx-auto mb-10 leading-relaxed">
|
|
32
|
+
{{ description }}
|
|
33
|
+
</p>
|
|
34
|
+
|
|
35
|
+
<div class="max-w-xl mx-auto mb-16">
|
|
36
|
+
<div class="group relative rounded-2xl bg-linear-to-b from-slate-800/80 to-slate-900/90 border border-slate-700/80 p-5 shadow-2xl backdrop-blur-md transition-all hover:border-indigo-500/40">
|
|
37
|
+
<div class="flex items-center justify-between mb-3 text-xs text-slate-400 font-mono border-b border-slate-800 pb-3">
|
|
38
|
+
<div class="flex items-center gap-2">
|
|
39
|
+
<span class="w-3 h-3 rounded-full bg-rose-500/80 inline-block"></span>
|
|
40
|
+
<span class="w-3 h-3 rounded-full bg-amber-500/80 inline-block"></span>
|
|
41
|
+
<span class="w-3 h-3 rounded-full bg-emerald-500/80 inline-block"></span>
|
|
42
|
+
<span class="ml-2 text-slate-500">app/index.njk</span>
|
|
43
|
+
</div>
|
|
44
|
+
<span class="text-indigo-400 font-sans text-[11px] font-semibold tracking-wide uppercase">Quick Start</span>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="text-left font-mono text-sm py-2">
|
|
47
|
+
<p class="text-slate-300">
|
|
48
|
+
<span class="text-purple-400">Edit</span>
|
|
49
|
+
<span class="text-emerald-300 px-1.5 py-0.5 rounded bg-slate-800 border border-slate-700">app/index.njk</span>
|
|
50
|
+
<span class="text-slate-400">to customize this page.</span>
|
|
51
|
+
</p>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 max-w-4xl mx-auto text-left">
|
|
57
|
+
{% for feat in features %}
|
|
58
|
+
<div class="p-6 rounded-2xl bg-slate-900/50 border border-slate-800/80 hover:border-slate-700 transition-all duration-200 group">
|
|
59
|
+
<div class="flex items-center justify-between mb-3">
|
|
60
|
+
<span class="text-xs font-semibold px-2.5 py-1 rounded-md bg-slate-800 text-indigo-400 border border-slate-700/50">
|
|
61
|
+
{{ feat.tag }}
|
|
62
|
+
</span>
|
|
63
|
+
<span class="text-slate-600 group-hover:text-slate-400 transition-colors text-sm">→</span>
|
|
64
|
+
</div>
|
|
65
|
+
<h3 class="text-base font-bold text-slate-100 mb-1.5 group-hover:text-indigo-300 transition-colors">
|
|
66
|
+
{{ feat.title }}
|
|
67
|
+
</h3>
|
|
68
|
+
<p class="text-sm text-slate-400 leading-relaxed">
|
|
69
|
+
{{ feat.desc }}
|
|
70
|
+
</p>
|
|
71
|
+
</div>
|
|
72
|
+
{% endfor %}
|
|
73
|
+
</div>
|
|
74
|
+
</main>
|
|
75
|
+
|
|
76
|
+
<footer class="py-6 border-t border-slate-800/60 text-center text-xs text-slate-500 flex flex-col sm:flex-row items-center justify-between gap-3">
|
|
77
|
+
<p>Powered by <span class="text-slate-300 font-medium">Nxpress</span></p>
|
|
78
|
+
<p class="font-mono text-slate-600">
|
|
79
|
+
{{ R.base }}
|
|
80
|
+
</p>
|
|
81
|
+
</footer>
|
|
82
|
+
</div>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" class="dark h-full">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<title>Nxpress App</title>
|
|
8
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
9
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
10
|
+
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
|
11
|
+
<link rel="stylesheet" href="/tailwind.css">
|
|
12
|
+
<style>
|
|
13
|
+
body { font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif; }
|
|
14
|
+
code, pre { font-family: 'JetBrains Mono', monospace; }
|
|
15
|
+
</style>
|
|
16
|
+
</head>
|
|
17
|
+
|
|
18
|
+
<body class="bg-[#0b0f19] text-slate-100 min-h-full antialiased selection:bg-indigo-500 selection:text-white relative overflow-x-hidden">
|
|
19
|
+
<div class="pointer-events-none absolute top-0 left-1/2 -translate-x-1/2 w-full max-w-7xl h-125 bg-radial from-indigo-500/15 via-purple-500/5 to-transparent blur-3xl -z-10"></div>
|
|
20
|
+
<div class="pointer-events-none absolute top-1/3 right-10 w-96 h-96 bg-blue-500/10 rounded-full blur-3xl -z-10"></div>
|
|
21
|
+
|
|
22
|
+
{{{body}}}
|
|
23
|
+
</body>
|
|
24
|
+
|
|
25
|
+
</html>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" class="dark h-full">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<meta name="description" content="{{ description }}">
|
|
8
|
+
<title>{{ title }}</title>
|
|
9
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
10
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
11
|
+
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
|
12
|
+
<link rel="stylesheet" href="/tailwind.css">
|
|
13
|
+
<style>
|
|
14
|
+
body { font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif; }
|
|
15
|
+
code, pre { font-family: 'JetBrains Mono', monospace; }
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body class="bg-[#0b0f19] text-slate-100 min-h-full antialiased selection:bg-indigo-500 selection:text-white relative overflow-x-hidden">
|
|
20
|
+
<div class="pointer-events-none absolute top-0 left-1/2 -translate-x-1/2 w-full max-w-7xl h-125 bg-radial from-indigo-500/15 via-purple-500/5 to-transparent blur-3xl -z-10"></div>
|
|
21
|
+
<div class="pointer-events-none absolute top-1/3 right-10 w-96 h-96 bg-blue-500/10 rounded-full blur-3xl -z-10"></div>
|
|
22
|
+
|
|
23
|
+
{{ body }}
|
|
24
|
+
</body>
|
|
25
|
+
|
|
26
|
+
</html>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" class="dark h-full">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<meta name="description" content="{{ description }}">
|
|
8
|
+
<title>{{ title }}</title>
|
|
9
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
10
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
11
|
+
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
|
12
|
+
<link rel="stylesheet" href="/tailwind.css">
|
|
13
|
+
<style>
|
|
14
|
+
body { font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif; }
|
|
15
|
+
code, pre { font-family: 'JetBrains Mono', monospace; }
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body class="bg-[#0b0f19] text-slate-100 min-h-full antialiased selection:bg-indigo-500 selection:text-white relative overflow-x-hidden">
|
|
20
|
+
<div class="pointer-events-none absolute top-0 left-1/2 -translate-x-1/2 w-full max-w-7xl h-125 bg-radial from-indigo-500/15 via-purple-500/5 to-transparent blur-3xl -z-10"></div>
|
|
21
|
+
<div class="pointer-events-none absolute top-1/3 right-10 w-96 h-96 bg-blue-500/10 rounded-full blur-3xl -z-10"></div>
|
|
22
|
+
|
|
23
|
+
{{ body | safe }}
|
|
24
|
+
</body>
|
|
25
|
+
|
|
26
|
+
</html>
|