@archetypeai/ds-cli 0.3.27 → 0.3.32

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.
@@ -266,7 +266,7 @@ export async function create(args) {
266
266
  }
267
267
 
268
268
  // configure CSS
269
- configureCss(projectPath, includeFonts);
269
+ configureCss(projectPath);
270
270
 
271
271
  // set up linting and formatting
272
272
  await installLinting(pm, projectPath);
package/commands/init.js CHANGED
@@ -226,7 +226,7 @@ export async function init(args) {
226
226
  }
227
227
 
228
228
  // configure CSS (prepend to existing)
229
- prependCss(projectPath, includeFonts);
229
+ prependCss(projectPath);
230
230
 
231
231
  // set up linting and formatting
232
232
  await installLinting(pm, projectPath);
@@ -131,7 +131,7 @@ export async function addDsLibTokens(args) {
131
131
  }
132
132
 
133
133
  // configure CSS imports in layout.css
134
- prependCss(projectDir, includeFonts);
134
+ prependCss(projectDir);
135
135
 
136
136
  p.outro('Design tokens installed successfully.');
137
137
  }
@@ -192,7 +192,7 @@ export async function addDsUiSvelte(args) {
192
192
  }
193
193
 
194
194
  // configure CSS imports in layout.css
195
- prependCss(projectDir, includeFonts);
195
+ prependCss(projectDir);
196
196
 
197
197
  const installSpinner = p.spinner();
198
198
  installSpinner.start('Installing components');
@@ -1,6 +1,18 @@
1
1
  import { existsSync, readdirSync, copyFileSync, mkdirSync } from 'fs';
2
2
  import { join, resolve } from 'path';
3
3
 
4
+ // strip surrounding quotes that some terminals (VS Code, Cursor) add on drag-and-drop
5
+ function sanitizePath(p) {
6
+ const trimmed = p.trim();
7
+ if (
8
+ (trimmed.startsWith("'") && trimmed.endsWith("'")) ||
9
+ (trimmed.startsWith('"') && trimmed.endsWith('"'))
10
+ ) {
11
+ return trimmed.slice(1, -1);
12
+ }
13
+ return trimmed;
14
+ }
15
+
4
16
  // all 15 required font files
5
17
  export const REQUIRED_FONTS = [
6
18
  // PP Neue Montreal Sans (.ttf)
@@ -24,7 +36,7 @@ export const REQUIRED_FONTS = [
24
36
 
25
37
  // validate that a directory contains all required font files
26
38
  export function validateFontsPath(fontsPath) {
27
- const resolved = resolve(fontsPath);
39
+ const resolved = resolve(sanitizePath(fontsPath));
28
40
 
29
41
  if (!existsSync(resolved)) {
30
42
  return { valid: false, missing: REQUIRED_FONTS, error: `Path does not exist: ${resolved}` };
@@ -51,7 +63,7 @@ export function validateFontsPath(fontsPath) {
51
63
 
52
64
  // copy required font files to <project>/static/fonts/
53
65
  export function copyFontsToStatic(fontsPath, projectPath) {
54
- const src = resolve(fontsPath);
66
+ const src = resolve(sanitizePath(fontsPath));
55
67
  const dest = join(projectPath, 'static', 'fonts');
56
68
  mkdirSync(dest, { recursive: true });
57
69
 
@@ -143,11 +143,9 @@ export function cn(...inputs) {
143
143
  }
144
144
 
145
145
  // configure CSS
146
- export function configureCss(projectPath, includeFonts) {
146
+ export function configureCss(projectPath) {
147
147
  let css = '';
148
- if (includeFonts) {
149
- css += '@import "@archetypeai/ds-lib-tokens/fonts.css";\n';
150
- }
148
+ css += '@import "@archetypeai/ds-lib-tokens/fonts.css";\n';
151
149
  css += '@import "@archetypeai/ds-lib-tokens/theme.css";\n';
152
150
  css += '@import "tailwindcss";\n';
153
151
  css += '@import "tw-animate-css";\n';
@@ -175,7 +173,7 @@ export async function installTailwind(pm, projectPath) {
175
173
  }
176
174
 
177
175
  // prepend CSS imports to existing layout.css
178
- export function prependCss(projectPath, includeFonts) {
176
+ export function prependCss(projectPath) {
179
177
  const cssPath = join(projectPath, 'src/routes/layout.css');
180
178
 
181
179
  let existing = '';
@@ -190,9 +188,7 @@ export function prependCss(projectPath, includeFonts) {
190
188
  }
191
189
 
192
190
  let imports = '';
193
- if (includeFonts) {
194
- imports += '@import "@archetypeai/ds-lib-tokens/fonts.css";\n';
195
- }
191
+ imports += '@import "@archetypeai/ds-lib-tokens/fonts.css";\n';
196
192
  imports += '@import "@archetypeai/ds-lib-tokens/theme.css";\n';
197
193
  imports += '@import "tailwindcss";\n';
198
194
  imports += '@import "tw-animate-css";\n';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archetypeai/ds-cli",
3
- "version": "0.3.27",
3
+ "version": "0.3.32",
4
4
  "description": "Archetype AI Design System CLI Tool",
5
5
  "type": "module",
6
6
  "bin": {