create-nocdn-app 0.0.9 → 0.0.10
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/index.js +24 -0
- package/package.json +1 -1
- package/template/app/fonts/IoskeleyMono-Light.woff2 +0 -0
- package/template/app/fonts/IoskeleyMono-Medium.woff2 +0 -0
- package/template/app/fonts/IoskeleyMono-Regular.woff2 +0 -0
- package/template/app/fonts/IoskeleyMono-SemiBold.woff2 +0 -0
- package/template/app/globals.css +2 -8
- package/template/app/layout.tsx +13 -2
- package/template/lib/components/code-block.tsx +1 -1
- package/template/app/fonts/PPSupplyMono-Variable.woff2 +0 -0
package/index.js
CHANGED
|
@@ -97,6 +97,16 @@ async function main() {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
const projectDescription = await clack.text({
|
|
101
|
+
message: "Project description (optional, press Enter to skip)",
|
|
102
|
+
placeholder: "A brief description of your project",
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
if (clack.isCancel(projectDescription)) {
|
|
106
|
+
clack.cancel("Operation cancelled");
|
|
107
|
+
process.exit(0);
|
|
108
|
+
}
|
|
109
|
+
|
|
100
110
|
const s = clack.spinner();
|
|
101
111
|
const pm = getPackageManager();
|
|
102
112
|
|
|
@@ -125,6 +135,20 @@ async function main() {
|
|
|
125
135
|
const packageJson = JSON.parse(await fs.readFile(packageJsonPath, "utf-8"));
|
|
126
136
|
packageJson.name = projectName;
|
|
127
137
|
await fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
|
138
|
+
|
|
139
|
+
const layoutPath = path.join(projectPath, "app", "layout.tsx");
|
|
140
|
+
let layoutContent = await fs.readFile(layoutPath, "utf-8");
|
|
141
|
+
layoutContent = layoutContent.replace(
|
|
142
|
+
/title:\s*["']\{\{project-name\}\}["']/,
|
|
143
|
+
`title: "${projectName}"`,
|
|
144
|
+
);
|
|
145
|
+
if (projectDescription && projectDescription.trim()) {
|
|
146
|
+
layoutContent = layoutContent.replace(
|
|
147
|
+
/description:\s*[\s\S]*?(?=,\n|\n\};)/,
|
|
148
|
+
`description: "${projectDescription.trim()}"`,
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
await fs.writeFile(layoutPath, layoutContent);
|
|
128
152
|
s.stop("Project configured");
|
|
129
153
|
|
|
130
154
|
if (!flags.skipInstall) {
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/template/app/globals.css
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
@import "tailwindcss";
|
|
2
2
|
@import "tw-animate-css";
|
|
3
3
|
|
|
4
|
-
@font-face {
|
|
5
|
-
font-family: "PP Supply Mono";
|
|
6
|
-
src: url("./fonts/PPSupplyMono-Variable.woff2") format("woff2");
|
|
7
|
-
font-weight: 100 900;
|
|
8
|
-
font-display: swap;
|
|
9
|
-
}
|
|
10
4
|
|
|
11
5
|
@custom-variant dark (&:is(.dark *));
|
|
12
6
|
@plugin "tailwindcss-motion";
|
|
@@ -16,9 +10,9 @@
|
|
|
16
10
|
--color-foreground: var(--foreground);
|
|
17
11
|
--font-sans: var(--font-geist-sans);
|
|
18
12
|
--font-mono: var(--font-geist-mono);
|
|
19
|
-
--font-pp-supply-mono: "PP Supply Mono", monospace;
|
|
20
13
|
--font-jetbrains-mono: var(--font-jetbrains-mono);
|
|
21
14
|
--font-inter: var(--font-inter);
|
|
15
|
+
--font-ioskeley-mono: var(--font-ioskeley-mono);
|
|
22
16
|
--color-sidebar-ring: var(--sidebar-ring);
|
|
23
17
|
--color-sidebar-border: var(--sidebar-border);
|
|
24
18
|
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
@@ -172,7 +166,7 @@
|
|
|
172
166
|
border-radius: 0.375rem;
|
|
173
167
|
padding: 2px 0.25rem;
|
|
174
168
|
font-size: 14px;
|
|
175
|
-
font-family: var(--font-
|
|
169
|
+
font-family: var(--font-ioskeley-mono);
|
|
176
170
|
font-weight: 330;
|
|
177
171
|
width: fit-content;
|
|
178
172
|
}
|
package/template/app/layout.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Metadata } from "next";
|
|
2
2
|
import { Geist, Geist_Mono, Inter, JetBrains_Mono } from "next/font/google";
|
|
3
|
+
import localFont from "next/font/local";
|
|
3
4
|
import "./globals.css";
|
|
4
5
|
|
|
5
6
|
const geistSans = Geist({
|
|
@@ -22,8 +23,18 @@ const jetBrainsMono = JetBrains_Mono({
|
|
|
22
23
|
subsets: ["latin"],
|
|
23
24
|
});
|
|
24
25
|
|
|
26
|
+
const ioskeleyMono = localFont({
|
|
27
|
+
src: [
|
|
28
|
+
{ path: "./fonts/IoskeleyMono-Light.woff2", weight: "300" },
|
|
29
|
+
{ path: "./fonts/IoskeleyMono-Regular.woff2", weight: "400" },
|
|
30
|
+
{ path: "./fonts/IoskeleyMono-Medium.woff2", weight: "500" },
|
|
31
|
+
{ path: "./fonts/IoskeleyMono-SemiBold.woff2", weight: "600" },
|
|
32
|
+
],
|
|
33
|
+
variable: "--font-ioskeley-mono",
|
|
34
|
+
});
|
|
35
|
+
|
|
25
36
|
export const metadata: Metadata = {
|
|
26
|
-
title: "
|
|
37
|
+
title: "{{project-name}}",
|
|
27
38
|
description:
|
|
28
39
|
"generated by git nocdn template: https://github.com/nocdn/create-nocdn-app/template",
|
|
29
40
|
};
|
|
@@ -36,7 +47,7 @@ export default function RootLayout({
|
|
|
36
47
|
return (
|
|
37
48
|
<html lang="en">
|
|
38
49
|
<body
|
|
39
|
-
className={`${geistSans.variable} ${geistMono.variable} ${inter.variable} ${jetBrainsMono.variable} bg-background`}
|
|
50
|
+
className={`${geistSans.variable} ${geistMono.variable} ${inter.variable} ${jetBrainsMono.variable} ${ioskeleyMono.variable} bg-background`}
|
|
40
51
|
>
|
|
41
52
|
{children}
|
|
42
53
|
</body>
|
|
@@ -18,7 +18,7 @@ export async function CodeBlock({ children, lang }: CodeBlockProps) {
|
|
|
18
18
|
|
|
19
19
|
return (
|
|
20
20
|
<div
|
|
21
|
-
className="font-
|
|
21
|
+
className="font-ioskeley-mono text-sm [&_pre]:bg-transparent [&_pre]:m-0 [&_pre]:p-0"
|
|
22
22
|
dangerouslySetInnerHTML={{ __html: html }}
|
|
23
23
|
/>
|
|
24
24
|
);
|
|
Binary file
|