@shipsite.dev/cli 0.1.5 → 0.2.0
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/build.d.ts.map +1 -1
- package/dist/commands/build.js +7 -18
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/dev.d.ts +0 -1
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +5 -630
- package/dist/commands/dev.js.map +1 -1
- package/dist/index.js +0 -0
- package/dist/workspace/clean.d.ts +2 -0
- package/dist/workspace/clean.d.ts.map +1 -0
- package/dist/workspace/clean.js +6 -0
- package/dist/workspace/clean.js.map +1 -0
- package/dist/workspace/generators/content-collections.d.ts +3 -0
- package/dist/workspace/generators/content-collections.d.ts.map +1 -0
- package/dist/workspace/generators/content-collections.js +8 -0
- package/dist/workspace/generators/content-collections.js.map +1 -0
- package/dist/workspace/generators/i18n.d.ts +3 -0
- package/dist/workspace/generators/i18n.d.ts.map +1 -0
- package/dist/workspace/generators/i18n.js +30 -0
- package/dist/workspace/generators/i18n.js.map +1 -0
- package/dist/workspace/generators/layout.d.ts +3 -0
- package/dist/workspace/generators/layout.d.ts.map +1 -0
- package/dist/workspace/generators/layout.js +85 -0
- package/dist/workspace/generators/layout.js.map +1 -0
- package/dist/workspace/generators/next-config.d.ts +3 -0
- package/dist/workspace/generators/next-config.d.ts.map +1 -0
- package/dist/workspace/generators/next-config.js +33 -0
- package/dist/workspace/generators/next-config.js.map +1 -0
- package/dist/workspace/generators/page.d.ts +3 -0
- package/dist/workspace/generators/page.d.ts.map +1 -0
- package/dist/workspace/generators/page.js +83 -0
- package/dist/workspace/generators/page.js.map +1 -0
- package/dist/workspace/generators/project-files.d.ts +3 -0
- package/dist/workspace/generators/project-files.d.ts.map +1 -0
- package/dist/workspace/generators/project-files.js +49 -0
- package/dist/workspace/generators/project-files.js.map +1 -0
- package/dist/workspace/generators/proxy.d.ts +3 -0
- package/dist/workspace/generators/proxy.d.ts.map +1 -0
- package/dist/workspace/generators/proxy.js +25 -0
- package/dist/workspace/generators/proxy.js.map +1 -0
- package/dist/workspace/generators/sitemap-robots.d.ts +3 -0
- package/dist/workspace/generators/sitemap-robots.d.ts.map +1 -0
- package/dist/workspace/generators/sitemap-robots.js +28 -0
- package/dist/workspace/generators/sitemap-robots.js.map +1 -0
- package/dist/workspace/index.d.ts +6 -0
- package/dist/workspace/index.d.ts.map +1 -0
- package/dist/workspace/index.js +51 -0
- package/dist/workspace/index.js.map +1 -0
- package/dist/workspace/resolve-next.d.ts +9 -0
- package/dist/workspace/resolve-next.d.ts.map +1 -0
- package/dist/workspace/resolve-next.js +21 -0
- package/dist/workspace/resolve-next.js.map +1 -0
- package/dist/workspace/styles.d.ts +3 -0
- package/dist/workspace/styles.d.ts.map +1 -0
- package/dist/workspace/styles.js +150 -0
- package/dist/workspace/styles.js.map +1 -0
- package/dist/workspace/symlinks.d.ts +2 -0
- package/dist/workspace/symlinks.d.ts.map +1 -0
- package/dist/workspace/symlinks.js +20 -0
- package/dist/workspace/symlinks.js.map +1 -0
- package/dist/workspace/types.d.ts +8 -0
- package/dist/workspace/types.d.ts.map +1 -0
- package/dist/workspace/types.js +2 -0
- package/dist/workspace/types.js.map +1 -0
- package/package.json +6 -1
package/dist/commands/dev.js
CHANGED
|
@@ -1,25 +1,13 @@
|
|
|
1
|
-
import { join, relative, dirname } from 'path';
|
|
2
|
-
import { existsSync, mkdirSync, writeFileSync, symlinkSync, readFileSync, realpathSync, } from 'fs';
|
|
3
1
|
import { spawn } from 'child_process';
|
|
2
|
+
import { prepareWorkspace } from '../workspace/index.js';
|
|
3
|
+
import { resolveNextBin } from '../workspace/resolve-next.js';
|
|
4
4
|
export async function dev() {
|
|
5
5
|
const rootDir = process.cwd();
|
|
6
|
-
const configPath = join(rootDir, 'shipsite.json');
|
|
7
|
-
if (!existsSync(configPath)) {
|
|
8
|
-
console.error('Error: shipsite.json not found in current directory');
|
|
9
|
-
process.exit(1);
|
|
10
|
-
}
|
|
11
6
|
console.log('\n Starting ShipSite dev server...\n');
|
|
12
|
-
|
|
13
|
-
generateWorkspace(rootDir);
|
|
14
|
-
// 2. Generate slug map
|
|
15
|
-
const { generateSlugMap } = await import('@shipsite.dev/core/generate-slug-map');
|
|
16
|
-
const shipSiteDir = join(rootDir, '.shipsite');
|
|
17
|
-
const slugMap = generateSlugMap(rootDir);
|
|
18
|
-
writeFileSync(join(shipSiteDir, 'slug-map.json'), JSON.stringify(slugMap, null, 2));
|
|
19
|
-
console.log(` Generated slug-map.json (${Object.keys(slugMap).length} entries)`);
|
|
20
|
-
// 3. Start next dev
|
|
7
|
+
const shipSiteDir = await prepareWorkspace(rootDir, 'dev');
|
|
21
8
|
console.log('\n Starting Next.js dev server...\n');
|
|
22
|
-
const
|
|
9
|
+
const { command, args } = resolveNextBin(rootDir);
|
|
10
|
+
const nextDev = spawn(command, [...args, 'dev'], {
|
|
23
11
|
cwd: shipSiteDir,
|
|
24
12
|
stdio: 'inherit',
|
|
25
13
|
env: { ...process.env, SHIPSITE_ROOT: rootDir },
|
|
@@ -31,617 +19,4 @@ export async function dev() {
|
|
|
31
19
|
nextDev.kill('SIGINT');
|
|
32
20
|
});
|
|
33
21
|
}
|
|
34
|
-
function hexToHsl(hex) {
|
|
35
|
-
const r = parseInt(hex.slice(1, 3), 16) / 255;
|
|
36
|
-
const g = parseInt(hex.slice(3, 5), 16) / 255;
|
|
37
|
-
const b = parseInt(hex.slice(5, 7), 16) / 255;
|
|
38
|
-
const max = Math.max(r, g, b);
|
|
39
|
-
const min = Math.min(r, g, b);
|
|
40
|
-
const l = (max + min) / 2;
|
|
41
|
-
if (max === min)
|
|
42
|
-
return [0, 0, l * 100];
|
|
43
|
-
const d = max - min;
|
|
44
|
-
const s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
45
|
-
let h = 0;
|
|
46
|
-
if (max === r)
|
|
47
|
-
h = ((g - b) / d + (g < b ? 6 : 0)) / 6;
|
|
48
|
-
else if (max === g)
|
|
49
|
-
h = ((b - r) / d + 2) / 6;
|
|
50
|
-
else
|
|
51
|
-
h = ((r - g) / d + 4) / 6;
|
|
52
|
-
return [Math.round(h * 360), Math.round(s * 100), Math.round(l * 100)];
|
|
53
|
-
}
|
|
54
|
-
function generateShadcnTokens(colors) {
|
|
55
|
-
const primary = colors.primary || '#5d5bd4';
|
|
56
|
-
const accent = colors.accent || '#067647';
|
|
57
|
-
const [pH, pS, pL] = hexToHsl(primary);
|
|
58
|
-
// Light mode
|
|
59
|
-
const brandFgLight = `${pH} ${Math.min(pS + 10, 100)}% ${Math.min(pL + 10, 85)}%`;
|
|
60
|
-
// Dark mode tokens (primary design - Launch UI inspired)
|
|
61
|
-
const darkBgH = pH;
|
|
62
|
-
const darkBgS = Math.min(Math.round(pS * 0.6), 50);
|
|
63
|
-
const darkBg = `${darkBgH} ${darkBgS}% 4%`;
|
|
64
|
-
const darkFg = `0 0% 98%`;
|
|
65
|
-
const darkCard = `${darkBgH} ${darkBgS}% 6%`;
|
|
66
|
-
const darkMuted = `${darkBgH} ${Math.round(darkBgS * 0.8)}% 15%`;
|
|
67
|
-
const darkMutedFg = `${darkBgH} ${Math.round(darkBgS * 0.4)}% 65%`;
|
|
68
|
-
const darkBorder = `${darkBgH} ${Math.round(darkBgS * 0.7)}% 14%`;
|
|
69
|
-
const darkInput = `${darkBgH} ${Math.round(darkBgS * 0.7)}% 18%`;
|
|
70
|
-
const darkRing = `${pH} ${Math.round(pS * 0.5)}% 60%`;
|
|
71
|
-
const darkBrandFg = `${pH} ${Math.min(pS + 10, 100)}% ${Math.min(pL + 15, 80)}%`;
|
|
72
|
-
return `:root {
|
|
73
|
-
--brand: hsl(${pH} ${pS}% ${pL}%);
|
|
74
|
-
--brand-foreground: hsl(${brandFgLight});
|
|
75
|
-
--primary: hsl(${pH} ${pS}% ${pL}%);
|
|
76
|
-
--primary-foreground: hsl(0 0% 98%);
|
|
77
|
-
--background: hsl(0 0% 100%);
|
|
78
|
-
--foreground: hsl(222 47% 11%);
|
|
79
|
-
--card: hsl(0 0% 100%);
|
|
80
|
-
--card-foreground: hsl(222 47% 11%);
|
|
81
|
-
--popover: hsl(0 0% 100%);
|
|
82
|
-
--popover-foreground: hsl(222 47% 11%);
|
|
83
|
-
--secondary: hsl(210 10% 93%);
|
|
84
|
-
--secondary-foreground: hsl(222 47% 20%);
|
|
85
|
-
--muted: hsl(210 10% 93%);
|
|
86
|
-
--muted-foreground: hsl(215 15% 45%);
|
|
87
|
-
--accent: hsl(210 10% 90%);
|
|
88
|
-
--accent-foreground: hsl(222 47% 20%);
|
|
89
|
-
--destructive: hsl(0 72% 51%);
|
|
90
|
-
--destructive-foreground: hsl(0 72% 51%);
|
|
91
|
-
--border: hsl(220 9% 91%);
|
|
92
|
-
--input: hsl(220 9% 91%);
|
|
93
|
-
--ring: hsl(215 15% 70%);
|
|
94
|
-
--radius: 0.625rem;
|
|
95
|
-
--line-width: 1px;
|
|
96
|
-
--shadow: #00000008;
|
|
97
|
-
--shadow-strong: #00000010;
|
|
98
|
-
--ss-primary: ${primary};
|
|
99
|
-
--ss-accent: ${accent};
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.dark {
|
|
103
|
-
--brand: hsl(${pH} ${pS}% ${pL}%);
|
|
104
|
-
--brand-foreground: hsl(${darkBrandFg});
|
|
105
|
-
--primary: hsl(${pH} ${pS}% ${pL}%);
|
|
106
|
-
--primary-foreground: hsl(0 0% 98%);
|
|
107
|
-
--background: hsl(${darkBg});
|
|
108
|
-
--foreground: hsl(${darkFg});
|
|
109
|
-
--card: hsl(${darkCard});
|
|
110
|
-
--card-foreground: hsl(${darkFg});
|
|
111
|
-
--popover: hsl(${darkCard});
|
|
112
|
-
--popover-foreground: hsl(${darkFg});
|
|
113
|
-
--secondary: hsl(${darkMuted});
|
|
114
|
-
--secondary-foreground: hsl(${darkFg});
|
|
115
|
-
--muted: hsl(${darkMuted});
|
|
116
|
-
--muted-foreground: hsl(${darkMutedFg});
|
|
117
|
-
--accent: hsl(${darkMuted});
|
|
118
|
-
--accent-foreground: hsl(${darkFg});
|
|
119
|
-
--destructive: hsl(0 62% 30%);
|
|
120
|
-
--destructive-foreground: hsl(${darkFg});
|
|
121
|
-
--border: hsl(${darkBorder});
|
|
122
|
-
--input: hsl(${darkInput});
|
|
123
|
-
--ring: hsl(${darkRing});
|
|
124
|
-
--radius: 0.625rem;
|
|
125
|
-
--line-width: 1px;
|
|
126
|
-
--shadow: #00000040;
|
|
127
|
-
--shadow-strong: #00000060;
|
|
128
|
-
--ss-primary: ${primary};
|
|
129
|
-
--ss-accent: ${accent};
|
|
130
|
-
}
|
|
131
|
-
`;
|
|
132
|
-
}
|
|
133
|
-
export function generateWorkspace(rootDir, mode = 'dev') {
|
|
134
|
-
const config = JSON.parse(readFileSync(join(rootDir, 'shipsite.json'), 'utf-8'));
|
|
135
|
-
const shipSiteDir = join(rootDir, '.shipsite');
|
|
136
|
-
if (!existsSync(shipSiteDir)) {
|
|
137
|
-
mkdirSync(shipSiteDir, { recursive: true });
|
|
138
|
-
}
|
|
139
|
-
const locales = config.i18n?.locales || ['en'];
|
|
140
|
-
const defaultLocale = config.i18n?.defaultLocale || 'en';
|
|
141
|
-
const localePrefix = config.i18n?.localePrefix || 'as-needed';
|
|
142
|
-
// Symlink content directory
|
|
143
|
-
const contentLink = join(shipSiteDir, 'content');
|
|
144
|
-
if (!existsSync(contentLink)) {
|
|
145
|
-
symlinkSync(join(rootDir, 'content'), contentLink);
|
|
146
|
-
}
|
|
147
|
-
// Symlink public directory
|
|
148
|
-
const publicLink = join(shipSiteDir, 'public');
|
|
149
|
-
if (!existsSync(publicLink) && existsSync(join(rootDir, 'public'))) {
|
|
150
|
-
symlinkSync(join(rootDir, 'public'), publicLink);
|
|
151
|
-
}
|
|
152
|
-
// Symlink custom components directory
|
|
153
|
-
const hasCustomComponents = existsSync(join(rootDir, 'components'));
|
|
154
|
-
const componentsLink = join(shipSiteDir, 'components');
|
|
155
|
-
if (!existsSync(componentsLink) && hasCustomComponents) {
|
|
156
|
-
symlinkSync(join(rootDir, 'components'), componentsLink);
|
|
157
|
-
}
|
|
158
|
-
// Generate next.config.ts
|
|
159
|
-
// Detect user's custom next.config file (always expected, but graceful fallback)
|
|
160
|
-
const userNextConfigExtensions = ['ts', 'mjs', 'js'];
|
|
161
|
-
const userNextConfig = userNextConfigExtensions.find((ext) => existsSync(join(rootDir, `next.config.${ext}`)));
|
|
162
|
-
const userConfigImportPath = userNextConfig === 'ts'
|
|
163
|
-
? '../next.config'
|
|
164
|
-
: `../next.config.${userNextConfig}`;
|
|
165
|
-
const userConfigImport = userNextConfig
|
|
166
|
-
? `import userConfig from '${userConfigImportPath}';\n`
|
|
167
|
-
: '';
|
|
168
|
-
const userConfigSpread = userNextConfig ? ' ...userConfig,\n' : '';
|
|
169
|
-
const distDirLine = mode === 'build' ? " distDir: '../.next',\n" : '';
|
|
170
|
-
writeFileSync(join(shipSiteDir, 'next.config.ts'), `import createNextIntlPlugin from 'next-intl/plugin';
|
|
171
|
-
import { withContentCollections } from '@content-collections/next';
|
|
172
|
-
import type { NextConfig } from 'next';
|
|
173
|
-
${userConfigImport}
|
|
174
|
-
const withNextIntl = createNextIntlPlugin('./src/i18n/request.ts');
|
|
175
|
-
|
|
176
|
-
const nextConfig: NextConfig = {
|
|
177
|
-
${userConfigSpread}${distDirLine} reactStrictMode: true,
|
|
178
|
-
poweredByHeader: false,
|
|
179
|
-
turbopack: {
|
|
180
|
-
resolveAlias: {
|
|
181
|
-
'content-collections': './.content-collections/generated',
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
export default withContentCollections(withNextIntl(nextConfig));
|
|
187
|
-
`);
|
|
188
|
-
// Generate content-collections.ts
|
|
189
|
-
writeFileSync(join(shipSiteDir, 'content-collections.ts'), `import { defineCollection, defineConfig } from '@content-collections/core';
|
|
190
|
-
import { z } from 'zod';
|
|
191
|
-
|
|
192
|
-
const sitePages = defineCollection({
|
|
193
|
-
name: 'sitePages',
|
|
194
|
-
directory: 'content',
|
|
195
|
-
include: '**/*.mdx',
|
|
196
|
-
schema: z.object({
|
|
197
|
-
content: z.string(),
|
|
198
|
-
title: z.string(),
|
|
199
|
-
description: z.string(),
|
|
200
|
-
category: z.string().optional(),
|
|
201
|
-
date: z.string().optional(),
|
|
202
|
-
image: z.string().optional(),
|
|
203
|
-
readingTime: z.number().optional(),
|
|
204
|
-
featured: z.boolean().optional(),
|
|
205
|
-
author: z.string().optional(),
|
|
206
|
-
slug: z.string().optional(),
|
|
207
|
-
}),
|
|
208
|
-
transform: (doc) => {
|
|
209
|
-
const locale = doc._meta.fileName.replace(/\\.mdx$/, '');
|
|
210
|
-
const contentFolder = doc._meta.directory;
|
|
211
|
-
const contentId = doc._meta.path.replace(/\\.mdx$/, '');
|
|
212
|
-
const path = doc._meta.directory;
|
|
213
|
-
let kind: string;
|
|
214
|
-
if (path.startsWith('blog/')) {
|
|
215
|
-
kind = path.split('/').length > 1 ? 'blog-article' : 'blog-index';
|
|
216
|
-
} else {
|
|
217
|
-
kind = 'page';
|
|
218
|
-
}
|
|
219
|
-
const raw = doc.content;
|
|
220
|
-
const match = raw.match(/<BlogIntro>\\s*([\\s\\S]*?)\\s*<\\/BlogIntro>/);
|
|
221
|
-
const excerpt = match
|
|
222
|
-
? match[1].replace(/\\*\\*(.*?)\\*\\*/g, '$1').replace(/\\[(.*?)\\]\\(.*?\\)/g, '$1').replace(/[*_~\\\`]/g, '').replace(/\\n+/g, ' ').trim()
|
|
223
|
-
: '';
|
|
224
|
-
return { ...doc, locale, contentFolder, contentId, kind, excerpt, body: { raw: doc.content } };
|
|
225
|
-
},
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
export default defineConfig({ content: [sitePages] });
|
|
229
|
-
`);
|
|
230
|
-
// Generate src directory structure
|
|
231
|
-
const srcDir = join(shipSiteDir, 'src');
|
|
232
|
-
mkdirSync(join(srcDir, 'i18n'), { recursive: true });
|
|
233
|
-
mkdirSync(join(srcDir, 'app', '[locale]', '[[...slug]]'), {
|
|
234
|
-
recursive: true,
|
|
235
|
-
});
|
|
236
|
-
mkdirSync(join(srcDir, 'styles'), { recursive: true });
|
|
237
|
-
// i18n/routing.ts
|
|
238
|
-
writeFileSync(join(srcDir, 'i18n', 'routing.ts'), `import { defineRouting } from 'next-intl/routing';
|
|
239
|
-
import { createNavigation } from 'next-intl/navigation';
|
|
240
|
-
|
|
241
|
-
export const routing = defineRouting({
|
|
242
|
-
locales: ${JSON.stringify(locales)},
|
|
243
|
-
defaultLocale: '${defaultLocale}',
|
|
244
|
-
localePrefix: '${localePrefix}',
|
|
245
|
-
});
|
|
246
|
-
|
|
247
|
-
export const { Link, redirect, usePathname, useRouter, getPathname } = createNavigation(routing);
|
|
248
|
-
`);
|
|
249
|
-
// i18n/request.ts
|
|
250
|
-
writeFileSync(join(srcDir, 'i18n', 'request.ts'), `import { getRequestConfig } from 'next-intl/server';
|
|
251
|
-
import { routing } from './routing';
|
|
252
|
-
|
|
253
|
-
export default getRequestConfig(async ({ requestLocale }) => {
|
|
254
|
-
let locale = await requestLocale;
|
|
255
|
-
if (!locale || !(routing.locales as readonly string[]).includes(locale)) {
|
|
256
|
-
locale = routing.defaultLocale;
|
|
257
|
-
}
|
|
258
|
-
return { locale, messages: {} };
|
|
259
|
-
});
|
|
260
|
-
`);
|
|
261
|
-
// middleware.ts
|
|
262
|
-
writeFileSync(join(srcDir, 'middleware.ts'), `import { createShipSiteMiddleware } from '@shipsite.dev/core/middleware';
|
|
263
|
-
import slugMap from '../slug-map.json';
|
|
264
|
-
|
|
265
|
-
const middleware = createShipSiteMiddleware({
|
|
266
|
-
locales: ${JSON.stringify(locales)},
|
|
267
|
-
defaultLocale: '${defaultLocale}',
|
|
268
|
-
localePrefix: '${localePrefix}',
|
|
269
|
-
slugMap: slugMap as Record<string, Record<string, string>>,
|
|
270
|
-
});
|
|
271
|
-
|
|
272
|
-
export default middleware;
|
|
273
|
-
|
|
274
|
-
// Next.js requires config to be a static object literal (not imported)
|
|
275
|
-
export const config = {
|
|
276
|
-
matcher: ['/((?!api|_next|_vercel|.*\\\\..*).*)'],
|
|
277
|
-
};
|
|
278
|
-
`);
|
|
279
|
-
// Resolve @shipsite.dev/components source path for Tailwind @source directive
|
|
280
|
-
const cssDir = join(srcDir, 'styles');
|
|
281
|
-
let componentsSourceDirective = '';
|
|
282
|
-
let utilsCssImport = '';
|
|
283
|
-
// Walk up from rootDir to find node_modules/@shipsite.dev/components
|
|
284
|
-
// Prefer src/ (has TSX source), fall back to dist/ (compiled JS still contains class names)
|
|
285
|
-
let searchDir = rootDir;
|
|
286
|
-
for (let i = 0; i < 10; i++) {
|
|
287
|
-
const pkgDir = join(searchDir, 'node_modules', '@shipsite.dev', 'components');
|
|
288
|
-
const srcCandidate = join(pkgDir, 'src');
|
|
289
|
-
const distCandidate = join(pkgDir, 'dist');
|
|
290
|
-
const candidate = existsSync(srcCandidate) ? srcCandidate : existsSync(distCandidate) ? distCandidate : null;
|
|
291
|
-
if (candidate) {
|
|
292
|
-
const realPath = realpathSync(candidate);
|
|
293
|
-
const rel = relative(cssDir, realPath).split('\\').join('/');
|
|
294
|
-
componentsSourceDirective = `\n@source "${rel}";`;
|
|
295
|
-
// Also resolve the utils.css path from components
|
|
296
|
-
const utilsCssPath = join(realPath, 'styles', 'utils.css');
|
|
297
|
-
if (existsSync(utilsCssPath)) {
|
|
298
|
-
const utilsRel = relative(cssDir, utilsCssPath).split('\\').join('/');
|
|
299
|
-
utilsCssImport = `\n@import "${utilsRel}";`;
|
|
300
|
-
}
|
|
301
|
-
break;
|
|
302
|
-
}
|
|
303
|
-
const parent = dirname(searchDir);
|
|
304
|
-
if (parent === searchDir)
|
|
305
|
-
break;
|
|
306
|
-
searchDir = parent;
|
|
307
|
-
}
|
|
308
|
-
// Generate shadcn/ui tokens from config colors
|
|
309
|
-
const shadcnTokens = generateShadcnTokens(config.colors || {});
|
|
310
|
-
// globals.css — full Launch UI compatible stylesheet
|
|
311
|
-
writeFileSync(join(cssDir, 'globals.css'), `@import 'tailwindcss';${componentsSourceDirective}${utilsCssImport}
|
|
312
|
-
|
|
313
|
-
@import 'tw-animate-css';
|
|
314
|
-
|
|
315
|
-
@custom-variant dark (&:where(.dark, .dark *));
|
|
316
|
-
|
|
317
|
-
@theme inline {
|
|
318
|
-
--color-brand: var(--brand);
|
|
319
|
-
--color-brand-foreground: var(--brand-foreground);
|
|
320
|
-
--color-background: var(--background);
|
|
321
|
-
--color-foreground: var(--foreground);
|
|
322
|
-
--color-card: var(--card);
|
|
323
|
-
--color-card-foreground: var(--card-foreground);
|
|
324
|
-
--color-popover: var(--popover);
|
|
325
|
-
--color-popover-foreground: var(--popover-foreground);
|
|
326
|
-
--color-primary: var(--primary);
|
|
327
|
-
--color-primary-foreground: var(--primary-foreground);
|
|
328
|
-
--color-secondary: var(--secondary);
|
|
329
|
-
--color-secondary-foreground: var(--secondary-foreground);
|
|
330
|
-
--color-muted: var(--muted);
|
|
331
|
-
--color-muted-foreground: var(--muted-foreground);
|
|
332
|
-
--color-accent: var(--accent);
|
|
333
|
-
--color-accent-foreground: var(--accent-foreground);
|
|
334
|
-
--color-destructive: var(--destructive);
|
|
335
|
-
--color-destructive-foreground: var(--destructive-foreground);
|
|
336
|
-
--color-border: var(--border);
|
|
337
|
-
--color-input: var(--input);
|
|
338
|
-
--color-ring: var(--ring);
|
|
339
|
-
|
|
340
|
-
--radius-sm: calc(var(--radius) - 4px);
|
|
341
|
-
--radius-md: calc(var(--radius) - 2px);
|
|
342
|
-
--radius-lg: var(--radius);
|
|
343
|
-
--radius-xl: calc(var(--radius) + 4px);
|
|
344
|
-
--radius-2xl: calc(var(--radius) + 8px);
|
|
345
|
-
|
|
346
|
-
--spacing-container: 1280px;
|
|
347
|
-
--spacing-container-lg: 1536px;
|
|
348
|
-
|
|
349
|
-
--shadow-md: 0 4px 6px -1px var(--shadow), 0 2px 4px -2px var(--shadow);
|
|
350
|
-
--shadow-xl: 0 20px 25px -5px var(--shadow), 0 8px 10px -6px var(--shadow);
|
|
351
|
-
--shadow-2xl: 0 25px 50px -12px var(--shadow);
|
|
352
|
-
--shadow-mockup: -12px 16px 48px var(--shadow-strong);
|
|
353
|
-
|
|
354
|
-
--line-width: 1px;
|
|
355
|
-
|
|
356
|
-
--animate-accordion-down: accordion-down 0.2s ease-out;
|
|
357
|
-
--animate-accordion-up: accordion-up 0.2s ease-out;
|
|
358
|
-
--animate-appear: appear 0.6s forwards ease-out;
|
|
359
|
-
--animate-appear-zoom: appear-zoom 0.6s forwards ease-out;
|
|
360
|
-
|
|
361
|
-
@keyframes accordion-down {
|
|
362
|
-
from { height: 0; }
|
|
363
|
-
to { height: var(--radix-accordion-content-height); }
|
|
364
|
-
}
|
|
365
|
-
@keyframes accordion-up {
|
|
366
|
-
from { height: var(--radix-accordion-content-height); }
|
|
367
|
-
to { height: 0; }
|
|
368
|
-
}
|
|
369
|
-
@keyframes appear {
|
|
370
|
-
0% { opacity: 0; transform: translateY(1rem); filter: blur(0.5rem); }
|
|
371
|
-
50% { filter: blur(0); }
|
|
372
|
-
100% { opacity: 1; transform: translateY(0); filter: blur(0); }
|
|
373
|
-
}
|
|
374
|
-
@keyframes appear-zoom {
|
|
375
|
-
0% { opacity: 0; transform: scale(0.5); }
|
|
376
|
-
100% { opacity: 1; transform: scale(1); }
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
${shadcnTokens}
|
|
381
|
-
@layer base {
|
|
382
|
-
* {
|
|
383
|
-
@apply border-border;
|
|
384
|
-
}
|
|
385
|
-
body {
|
|
386
|
-
@apply bg-background text-foreground;
|
|
387
|
-
font-family: system-ui, -apple-system, sans-serif;
|
|
388
|
-
-webkit-font-smoothing: antialiased;
|
|
389
|
-
}
|
|
390
|
-
html { scroll-behavior: smooth; }
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
.container-main {
|
|
394
|
-
width: 100%;
|
|
395
|
-
max-width: 76rem;
|
|
396
|
-
margin-inline: auto;
|
|
397
|
-
padding-inline: clamp(1rem, 3vw, 3rem);
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
@layer utilities {
|
|
401
|
-
@keyframes marquee {
|
|
402
|
-
from { transform: translateX(0); }
|
|
403
|
-
to { transform: translateX(calc(-100% - var(--marquee-gap))); }
|
|
404
|
-
}
|
|
405
|
-
.animate-marquee {
|
|
406
|
-
flex-shrink: 0;
|
|
407
|
-
animation: marquee var(--marquee-duration, 30s) linear infinite;
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
.page-prose > h2, .page-prose > h3, .page-prose > h4,
|
|
412
|
-
.page-prose > p, .page-prose > ul, .page-prose > ol,
|
|
413
|
-
.page-prose > blockquote {
|
|
414
|
-
width: 100%;
|
|
415
|
-
max-width: 76rem;
|
|
416
|
-
margin-inline: auto;
|
|
417
|
-
padding-inline: clamp(1rem, 3vw, 3rem);
|
|
418
|
-
}
|
|
419
|
-
.page-prose > h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2.25rem); font-weight: 600; }
|
|
420
|
-
.page-prose > h3 { margin-top: 1.5rem; margin-bottom: 0.75rem; font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem); font-weight: 600; }
|
|
421
|
-
.page-prose > p { font-size: 1rem; line-height: 1.6; margin-top: 0.5rem; margin-bottom: 0.5rem; }
|
|
422
|
-
.page-prose > ul { list-style: disc; padding-left: 1.75rem; margin-block: 0.75rem; }
|
|
423
|
-
.page-prose > ol { list-style: decimal; padding-left: 1.75rem; margin-block: 0.75rem; }
|
|
424
|
-
.page-prose > p a { color: var(--primary); text-decoration: underline; font-weight: 500; }
|
|
425
|
-
.page-prose > p a:hover { text-decoration: none; }
|
|
426
|
-
`);
|
|
427
|
-
// layout.tsx
|
|
428
|
-
writeFileSync(join(srcDir, 'app', '[locale]', 'layout.tsx'), `import { notFound } from 'next/navigation';
|
|
429
|
-
import { routing } from '../../i18n/routing';
|
|
430
|
-
import { ShipSiteProvider } from '@shipsite.dev/components/context';
|
|
431
|
-
import { ThemeProvider } from '@shipsite.dev/components/theme';
|
|
432
|
-
import { Header, Footer } from '@shipsite.dev/components';
|
|
433
|
-
import { generateNavLinks, generateAlternatePathMap, getConfig, getSiteUrl } from '@shipsite.dev/core';
|
|
434
|
-
import '../../styles/globals.css';
|
|
435
|
-
import type { Metadata, Viewport } from 'next';
|
|
436
|
-
|
|
437
|
-
const config = getConfig();
|
|
438
|
-
|
|
439
|
-
export function generateStaticParams() {
|
|
440
|
-
return routing.locales.map((locale) => ({ locale }));
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
export const metadata: Metadata = {
|
|
444
|
-
metadataBase: new URL(getSiteUrl()),
|
|
445
|
-
title: { default: config.name, template: '%s | ' + config.name },
|
|
446
|
-
};
|
|
447
|
-
|
|
448
|
-
export const viewport: Viewport = {
|
|
449
|
-
width: 'device-width',
|
|
450
|
-
initialScale: 1,
|
|
451
|
-
};
|
|
452
|
-
|
|
453
|
-
interface LayoutProps {
|
|
454
|
-
children: React.ReactNode;
|
|
455
|
-
params: Promise<{ locale: string }>;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
export default async function LocaleLayout({ children, params }: LayoutProps) {
|
|
459
|
-
const { locale } = await params;
|
|
460
|
-
if (!(routing.locales as readonly string[]).includes(locale)) notFound();
|
|
461
|
-
|
|
462
|
-
const navLinks = generateNavLinks(locale);
|
|
463
|
-
const alternatePathMap = generateAlternatePathMap();
|
|
464
|
-
|
|
465
|
-
return (
|
|
466
|
-
<html lang={locale} suppressHydrationWarning>
|
|
467
|
-
<body>
|
|
468
|
-
<ThemeProvider>
|
|
469
|
-
<ShipSiteProvider value={{
|
|
470
|
-
siteName: config.name,
|
|
471
|
-
siteUrl: config.url,
|
|
472
|
-
logo: config.logo,
|
|
473
|
-
ogImage: config.ogImage,
|
|
474
|
-
colors: {
|
|
475
|
-
primary: config.colors?.primary || '#5d5bd4',
|
|
476
|
-
accent: config.colors?.accent || '#067647',
|
|
477
|
-
background: config.colors?.background || '#ffffff',
|
|
478
|
-
text: config.colors?.text || '#1f2a37',
|
|
479
|
-
},
|
|
480
|
-
navigation: config.navigation || { items: [] },
|
|
481
|
-
footer: config.footer || {},
|
|
482
|
-
navLinks,
|
|
483
|
-
alternatePathMap,
|
|
484
|
-
locale,
|
|
485
|
-
locales: config.i18n?.locales || ['en'],
|
|
486
|
-
defaultLocale: config.i18n?.defaultLocale || 'en',
|
|
487
|
-
}}>
|
|
488
|
-
<Header />
|
|
489
|
-
<main id="main-content">{children}</main>
|
|
490
|
-
<Footer />
|
|
491
|
-
</ShipSiteProvider>
|
|
492
|
-
</ThemeProvider>
|
|
493
|
-
</body>
|
|
494
|
-
</html>
|
|
495
|
-
);
|
|
496
|
-
}
|
|
497
|
-
`);
|
|
498
|
-
// page.tsx
|
|
499
|
-
const customComponentsImport = hasCustomComponents
|
|
500
|
-
? `import * as CustomComponents from '../../../../components';\n`
|
|
501
|
-
: '';
|
|
502
|
-
const allComponentsMerge = hasCustomComponents
|
|
503
|
-
? 'const AllComponents = { ...Components, ...CustomComponents };\n'
|
|
504
|
-
: 'const AllComponents = Components;\n';
|
|
505
|
-
writeFileSync(join(srcDir, 'app', '[locale]', '[[...slug]]', 'page.tsx'), `import { setRequestLocale } from 'next-intl/server';
|
|
506
|
-
import { notFound } from 'next/navigation';
|
|
507
|
-
import { getPageContent } from '@shipsite.dev/core/mdx';
|
|
508
|
-
import { getPageBySlug, generateAllStaticParams, buildCanonicalUrl, getAlternateUrls, isNoIndexPage } from '@shipsite.dev/core/pages';
|
|
509
|
-
import { resolveAuthor } from '@shipsite.dev/core/blog';
|
|
510
|
-
import { getConfig, getSiteUrl } from '@shipsite.dev/core/config';
|
|
511
|
-
import * as Components from '@shipsite.dev/components';
|
|
512
|
-
${customComponentsImport}import type { Metadata } from 'next';
|
|
513
|
-
|
|
514
|
-
${allComponentsMerge}
|
|
515
|
-
interface PageProps {
|
|
516
|
-
params: Promise<{ locale: string; slug?: string[] }>;
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
export async function generateStaticParams() {
|
|
520
|
-
return generateAllStaticParams();
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
export const dynamicParams = false;
|
|
524
|
-
|
|
525
|
-
export async function generateMetadata({ params }: PageProps): Promise<Metadata> {
|
|
526
|
-
const { locale, slug } = await params;
|
|
527
|
-
const slugPath = slug?.join('/') || '';
|
|
528
|
-
const pageConfig = getPageBySlug(slugPath, locale);
|
|
529
|
-
if (!pageConfig) return {};
|
|
530
|
-
|
|
531
|
-
try {
|
|
532
|
-
const { frontmatter } = await getPageContent(pageConfig.content, locale, AllComponents);
|
|
533
|
-
const canonicalUrl = buildCanonicalUrl(locale, slugPath);
|
|
534
|
-
const config = getConfig();
|
|
535
|
-
const languages = getAlternateUrls(pageConfig);
|
|
536
|
-
|
|
537
|
-
return {
|
|
538
|
-
title: slugPath === '' ? { absolute: frontmatter.title } : frontmatter.title,
|
|
539
|
-
description: frontmatter.description,
|
|
540
|
-
...(isNoIndexPage(pageConfig) && { robots: { index: false, follow: true } }),
|
|
541
|
-
alternates: { canonical: canonicalUrl, languages },
|
|
542
|
-
openGraph: {
|
|
543
|
-
title: frontmatter.title,
|
|
544
|
-
description: frontmatter.description,
|
|
545
|
-
url: canonicalUrl,
|
|
546
|
-
siteName: config.name,
|
|
547
|
-
locale,
|
|
548
|
-
type: pageConfig.type === 'blog-article' ? 'article' : 'website',
|
|
549
|
-
},
|
|
550
|
-
};
|
|
551
|
-
} catch {
|
|
552
|
-
return {};
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
export default async function DynamicPage({ params }: PageProps) {
|
|
557
|
-
const { locale, slug } = await params;
|
|
558
|
-
const slugPath = slug?.join('/') || '';
|
|
559
|
-
setRequestLocale(locale);
|
|
560
|
-
|
|
561
|
-
const pageConfig = getPageBySlug(slugPath, locale);
|
|
562
|
-
if (!pageConfig) notFound();
|
|
563
|
-
|
|
564
|
-
let content;
|
|
565
|
-
try {
|
|
566
|
-
const result = await getPageContent(pageConfig.content, locale, AllComponents);
|
|
567
|
-
content = result.content;
|
|
568
|
-
} catch (error) {
|
|
569
|
-
console.error('MDX content error:', error);
|
|
570
|
-
notFound();
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
return <div className="page-prose">{content}</div>;
|
|
574
|
-
}
|
|
575
|
-
`);
|
|
576
|
-
// sitemap.ts
|
|
577
|
-
writeFileSync(join(srcDir, 'app', 'sitemap.ts'), `import sitemap from '@shipsite.dev/core/sitemap';
|
|
578
|
-
export default sitemap;
|
|
579
|
-
`);
|
|
580
|
-
// robots.ts
|
|
581
|
-
writeFileSync(join(srcDir, 'app', 'robots.ts'), `import type { MetadataRoute } from 'next';
|
|
582
|
-
import { getSiteUrl } from '@shipsite.dev/core/config';
|
|
583
|
-
|
|
584
|
-
export default function robots(): MetadataRoute.Robots {
|
|
585
|
-
return {
|
|
586
|
-
rules: [
|
|
587
|
-
{ userAgent: '*', allow: '/' },
|
|
588
|
-
{ userAgent: 'GPTBot', allow: '/' },
|
|
589
|
-
{ userAgent: 'ChatGPT-User', allow: '/' },
|
|
590
|
-
{ userAgent: 'ClaudeBot', allow: '/' },
|
|
591
|
-
{ userAgent: 'Claude-Web', allow: '/' },
|
|
592
|
-
{ userAgent: 'PerplexityBot', allow: '/' },
|
|
593
|
-
{ userAgent: 'Applebot-Extended', allow: '/' },
|
|
594
|
-
{ userAgent: 'GoogleOther', allow: '/' },
|
|
595
|
-
{ userAgent: 'cohere-ai', allow: '/' },
|
|
596
|
-
],
|
|
597
|
-
sitemap: getSiteUrl() + '/sitemap.xml',
|
|
598
|
-
};
|
|
599
|
-
}
|
|
600
|
-
`);
|
|
601
|
-
// tsconfig.json
|
|
602
|
-
writeFileSync(join(shipSiteDir, 'tsconfig.json'), JSON.stringify({
|
|
603
|
-
compilerOptions: {
|
|
604
|
-
target: 'ES2022',
|
|
605
|
-
lib: ['dom', 'dom.iterable', 'esnext'],
|
|
606
|
-
allowJs: true,
|
|
607
|
-
skipLibCheck: true,
|
|
608
|
-
strict: true,
|
|
609
|
-
noEmit: true,
|
|
610
|
-
esModuleInterop: true,
|
|
611
|
-
module: 'esnext',
|
|
612
|
-
moduleResolution: 'bundler',
|
|
613
|
-
resolveJsonModule: true,
|
|
614
|
-
isolatedModules: true,
|
|
615
|
-
jsx: 'preserve',
|
|
616
|
-
incremental: true,
|
|
617
|
-
plugins: [{ name: 'next' }],
|
|
618
|
-
paths: {
|
|
619
|
-
'@/*': ['./src/*'],
|
|
620
|
-
'content-collections': ['./.content-collections/generated'],
|
|
621
|
-
},
|
|
622
|
-
},
|
|
623
|
-
include: [
|
|
624
|
-
'next-env.d.ts',
|
|
625
|
-
'**/*.ts',
|
|
626
|
-
'**/*.tsx',
|
|
627
|
-
'.next/types/**/*.ts',
|
|
628
|
-
],
|
|
629
|
-
exclude: ['node_modules'],
|
|
630
|
-
}, null, 2));
|
|
631
|
-
// package.json for workspace
|
|
632
|
-
// Dependencies resolve from the parent project's node_modules via Node resolution
|
|
633
|
-
writeFileSync(join(shipSiteDir, 'package.json'), JSON.stringify({
|
|
634
|
-
name: 'shipsite-workspace',
|
|
635
|
-
private: true,
|
|
636
|
-
type: 'module',
|
|
637
|
-
}, null, 2));
|
|
638
|
-
// postcss.config.mjs
|
|
639
|
-
writeFileSync(join(shipSiteDir, 'postcss.config.mjs'), `export default {
|
|
640
|
-
plugins: {
|
|
641
|
-
'@tailwindcss/postcss': {},
|
|
642
|
-
},
|
|
643
|
-
};
|
|
644
|
-
`);
|
|
645
|
-
console.log(' Generated .shipsite workspace');
|
|
646
|
-
}
|
|
647
22
|
//# sourceMappingURL=dev.js.map
|
package/dist/commands/dev.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.js","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAAA,OA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