@archetypeai/ds-cli 0.3.26 → 0.3.27
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/files/AGENTS.md +1 -1
- package/files/CLAUDE.md +1 -1
- package/lib/install-fonts-local.js +2 -139
- package/lib/scaffold-ds-svelte-project.js +2 -2
- package/package.json +1 -1
package/files/AGENTS.md
CHANGED
package/files/CLAUDE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { existsSync, readdirSync, copyFileSync, mkdirSync
|
|
1
|
+
import { existsSync, readdirSync, copyFileSync, mkdirSync } from 'fs';
|
|
2
2
|
import { join, resolve } from 'path';
|
|
3
3
|
|
|
4
4
|
// all 15 required font files
|
|
@@ -22,132 +22,6 @@ export const REQUIRED_FONTS = [
|
|
|
22
22
|
'PPNeueMontrealMono-Bold.otf'
|
|
23
23
|
];
|
|
24
24
|
|
|
25
|
-
// hardcoded fonts.css template
|
|
26
|
-
export const FONTS_CSS = `/* PP Neue Montreal Sans*/
|
|
27
|
-
|
|
28
|
-
@font-face {
|
|
29
|
-
font-family: 'PP Neue Montreal';
|
|
30
|
-
src: url('/fonts/PPNeueMontreal-Thin.ttf') format('truetype');
|
|
31
|
-
font-weight: 100;
|
|
32
|
-
font-style: normal;
|
|
33
|
-
font-display: swap;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
@font-face {
|
|
37
|
-
font-family: 'PP Neue Montreal';
|
|
38
|
-
src: url('/fonts/PPNeueMontreal-ThinItalic.ttf') format('truetype');
|
|
39
|
-
font-weight: 100;
|
|
40
|
-
font-style: italic;
|
|
41
|
-
font-display: swap;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@font-face {
|
|
45
|
-
font-family: 'PP Neue Montreal';
|
|
46
|
-
src: url('/fonts/PPNeueMontreal-Light.ttf') format('truetype');
|
|
47
|
-
font-weight: 300;
|
|
48
|
-
font-style: normal;
|
|
49
|
-
font-display: swap;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@font-face {
|
|
53
|
-
font-family: 'PP Neue Montreal';
|
|
54
|
-
src: url('/fonts/PPNeueMontreal-Regular.ttf') format('truetype');
|
|
55
|
-
font-weight: 400;
|
|
56
|
-
font-style: normal;
|
|
57
|
-
font-display: swap;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
@font-face {
|
|
61
|
-
font-family: 'PP Neue Montreal';
|
|
62
|
-
src: url('/fonts/PPNeueMontreal-Italic.ttf') format('truetype');
|
|
63
|
-
font-weight: 400;
|
|
64
|
-
font-style: italic;
|
|
65
|
-
font-display: swap;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
@font-face {
|
|
69
|
-
font-family: 'PP Neue Montreal';
|
|
70
|
-
src: url('/fonts/PPNeueMontreal-Book.ttf') format('truetype');
|
|
71
|
-
font-weight: 400;
|
|
72
|
-
font-style: normal;
|
|
73
|
-
font-display: swap;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
@font-face {
|
|
77
|
-
font-family: 'PP Neue Montreal';
|
|
78
|
-
src: url('/fonts/PPNeueMontreal-Medium.ttf') format('truetype');
|
|
79
|
-
font-weight: 500;
|
|
80
|
-
font-style: normal;
|
|
81
|
-
font-display: swap;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
@font-face {
|
|
85
|
-
font-family: 'PP Neue Montreal';
|
|
86
|
-
src: url('/fonts/PPNeueMontreal-Bold.ttf') format('truetype');
|
|
87
|
-
font-weight: 700;
|
|
88
|
-
font-style: normal;
|
|
89
|
-
font-display: swap;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@font-face {
|
|
93
|
-
font-family: 'PP Neue Montreal';
|
|
94
|
-
src: url('/fonts/PPNeueMontreal-BoldItalic.ttf') format('truetype');
|
|
95
|
-
font-weight: 700;
|
|
96
|
-
font-style: italic;
|
|
97
|
-
font-display: swap;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/* PP Neue Montreal Mono */
|
|
101
|
-
|
|
102
|
-
@font-face {
|
|
103
|
-
font-family: 'PP Neue Montreal Mono';
|
|
104
|
-
src: url('/fonts/PPNeueMontrealMono-Thin.otf') format('opentype');
|
|
105
|
-
font-weight: 100;
|
|
106
|
-
font-style: normal;
|
|
107
|
-
font-display: swap;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
@font-face {
|
|
111
|
-
font-family: 'PP Neue Montreal Mono';
|
|
112
|
-
src: url('/fonts/PPNeueMontrealMono-Regular.otf') format('opentype');
|
|
113
|
-
font-weight: 400;
|
|
114
|
-
font-style: normal;
|
|
115
|
-
font-display: swap;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
@font-face {
|
|
119
|
-
font-family: 'PP Neue Montreal Mono';
|
|
120
|
-
src: url('/fonts/PPNeueMontrealMono-RegularItalic.otf') format('opentype');
|
|
121
|
-
font-weight: 400;
|
|
122
|
-
font-style: italic;
|
|
123
|
-
font-display: swap;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
@font-face {
|
|
127
|
-
font-family: 'PP Neue Montreal Mono';
|
|
128
|
-
src: url('/fonts/PPNeueMontrealMono-Book.otf') format('opentype');
|
|
129
|
-
font-weight: 400;
|
|
130
|
-
font-style: normal;
|
|
131
|
-
font-display: swap;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
@font-face {
|
|
135
|
-
font-family: 'PP Neue Montreal Mono';
|
|
136
|
-
src: url('/fonts/PPNeueMontrealMono-Medium.otf') format('opentype');
|
|
137
|
-
font-weight: 500;
|
|
138
|
-
font-style: normal;
|
|
139
|
-
font-display: swap;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
@font-face {
|
|
143
|
-
font-family: 'PP Neue Montreal Mono';
|
|
144
|
-
src: url('/fonts/PPNeueMontrealMono-Bold.otf') format('opentype');
|
|
145
|
-
font-weight: 700;
|
|
146
|
-
font-style: normal;
|
|
147
|
-
font-display: swap;
|
|
148
|
-
}
|
|
149
|
-
`;
|
|
150
|
-
|
|
151
25
|
// validate that a directory contains all required font files
|
|
152
26
|
export function validateFontsPath(fontsPath) {
|
|
153
27
|
const resolved = resolve(fontsPath);
|
|
@@ -188,17 +62,7 @@ export function copyFontsToStatic(fontsPath, projectPath) {
|
|
|
188
62
|
return REQUIRED_FONTS.length;
|
|
189
63
|
}
|
|
190
64
|
|
|
191
|
-
//
|
|
192
|
-
function writeFontsCss(projectPath) {
|
|
193
|
-
const cssPath = join(projectPath, 'src', 'routes', 'fonts.css');
|
|
194
|
-
const dir = join(projectPath, 'src', 'routes');
|
|
195
|
-
if (!existsSync(dir)) {
|
|
196
|
-
mkdirSync(dir, { recursive: true });
|
|
197
|
-
}
|
|
198
|
-
writeFileSync(cssPath, FONTS_CSS);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// orchestrate: validate, copy fonts, write fonts.css
|
|
65
|
+
// orchestrate: validate and copy font files to static/fonts/
|
|
202
66
|
export function installLocalFonts(fontsPath, projectPath) {
|
|
203
67
|
const validation = validateFontsPath(fontsPath);
|
|
204
68
|
if (!validation.valid) {
|
|
@@ -206,7 +70,6 @@ export function installLocalFonts(fontsPath, projectPath) {
|
|
|
206
70
|
}
|
|
207
71
|
|
|
208
72
|
const fileCount = copyFontsToStatic(fontsPath, projectPath);
|
|
209
|
-
writeFontsCss(projectPath);
|
|
210
73
|
|
|
211
74
|
return { success: true, fileCount };
|
|
212
75
|
}
|
|
@@ -146,7 +146,7 @@ export function cn(...inputs) {
|
|
|
146
146
|
export function configureCss(projectPath, includeFonts) {
|
|
147
147
|
let css = '';
|
|
148
148
|
if (includeFonts) {
|
|
149
|
-
css += '@import "
|
|
149
|
+
css += '@import "@archetypeai/ds-lib-tokens/fonts.css";\n';
|
|
150
150
|
}
|
|
151
151
|
css += '@import "@archetypeai/ds-lib-tokens/theme.css";\n';
|
|
152
152
|
css += '@import "tailwindcss";\n';
|
|
@@ -191,7 +191,7 @@ export function prependCss(projectPath, includeFonts) {
|
|
|
191
191
|
|
|
192
192
|
let imports = '';
|
|
193
193
|
if (includeFonts) {
|
|
194
|
-
imports += '@import "
|
|
194
|
+
imports += '@import "@archetypeai/ds-lib-tokens/fonts.css";\n';
|
|
195
195
|
}
|
|
196
196
|
imports += '@import "@archetypeai/ds-lib-tokens/theme.css";\n';
|
|
197
197
|
imports += '@import "tailwindcss";\n';
|