@archetypeai/ds-cli 0.3.20 → 0.3.21
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/lib/add-ds-lib-tokens.js +13 -5
- package/lib/add-ds-ui-svelte.js +4 -0
- package/package.json +1 -1
package/lib/add-ds-lib-tokens.js
CHANGED
|
@@ -4,6 +4,7 @@ import * as p from '@clack/prompts';
|
|
|
4
4
|
import { detectPm, getPm } from './use-package-manager.js';
|
|
5
5
|
import { validateFontsPath, installLocalFonts } from './install-fonts-local.js';
|
|
6
6
|
import { isInteractive } from './is-interactive.js';
|
|
7
|
+
import { prependCss } from './scaffold-ds-svelte-project.js';
|
|
7
8
|
|
|
8
9
|
const execFileAsync = promisify(execFile);
|
|
9
10
|
|
|
@@ -50,11 +51,15 @@ export async function addDsLibTokens(args) {
|
|
|
50
51
|
s.start('Installing design tokens');
|
|
51
52
|
try {
|
|
52
53
|
const [cmd, ...baseArgs] = pm.install.split(/\s+/);
|
|
53
|
-
await execFileAsync(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
await execFileAsync(
|
|
55
|
+
cmd,
|
|
56
|
+
[...baseArgs, '@archetypeai/ds-lib-tokens', 'tailwindcss', 'tw-animate-css'],
|
|
57
|
+
{
|
|
58
|
+
stdio: 'pipe',
|
|
59
|
+
maxBuffer: 10 * 1024 * 1024,
|
|
60
|
+
cwd: projectDir
|
|
61
|
+
}
|
|
62
|
+
);
|
|
58
63
|
s.stop('Design tokens installed');
|
|
59
64
|
} catch (error) {
|
|
60
65
|
s.stop('Failed');
|
|
@@ -125,5 +130,8 @@ export async function addDsLibTokens(args) {
|
|
|
125
130
|
}
|
|
126
131
|
}
|
|
127
132
|
|
|
133
|
+
// configure CSS imports in layout.css
|
|
134
|
+
prependCss(projectDir, includeFonts);
|
|
135
|
+
|
|
128
136
|
p.outro('Design tokens installed successfully.');
|
|
129
137
|
}
|
package/lib/add-ds-ui-svelte.js
CHANGED
|
@@ -8,6 +8,7 @@ import { validateRegistryUrl } from './validate-url.js';
|
|
|
8
8
|
import { detectPm, getPm } from './use-package-manager.js';
|
|
9
9
|
import { validateFontsPath, installLocalFonts } from './install-fonts-local.js';
|
|
10
10
|
import { isInteractive } from './is-interactive.js';
|
|
11
|
+
import { prependCss } from './scaffold-ds-svelte-project.js';
|
|
11
12
|
|
|
12
13
|
const execFileAsync = promisify(execFile);
|
|
13
14
|
|
|
@@ -190,6 +191,9 @@ export async function addDsUiSvelte(args) {
|
|
|
190
191
|
}
|
|
191
192
|
}
|
|
192
193
|
|
|
194
|
+
// configure CSS imports in layout.css
|
|
195
|
+
prependCss(projectDir, includeFonts);
|
|
196
|
+
|
|
193
197
|
const installSpinner = p.spinner();
|
|
194
198
|
installSpinner.start('Installing components');
|
|
195
199
|
|