@alignui/cli 0.0.1-alpha.3 → 0.0.1-alpha.5
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/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/tailwind.ts +7 -3
- package/src/utils/tokens.ts +16 -12
package/package.json
CHANGED
package/src/commands/tailwind.ts
CHANGED
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
import { prettierFormat } from '@/src/utils/prettier';
|
|
33
33
|
import { formatHslColor, formatRgbColor } from '@/src/utils/color-helpers';
|
|
34
34
|
|
|
35
|
-
const
|
|
35
|
+
const PROJECT_DEV_DEPENDENCIES = ['tailwindcss-animate'];
|
|
36
36
|
const highlight = (text: string) => chalk.hex('#8c71f6')(text);
|
|
37
37
|
|
|
38
38
|
const tailwindInitOptionsSchema = z.object({
|
|
@@ -72,7 +72,7 @@ export const initTailwind = new Command()
|
|
|
72
72
|
logger.break();
|
|
73
73
|
logger.white(`Installed the following packages:
|
|
74
74
|
|
|
75
|
-
${
|
|
75
|
+
${PROJECT_DEV_DEPENDENCIES.map((pkg) => ` - ${pkg}`).join('\n')}`);
|
|
76
76
|
logger.break();
|
|
77
77
|
} catch (error) {
|
|
78
78
|
handleError(error);
|
|
@@ -259,7 +259,11 @@ async function runInit(cwd: string, config: Config) {
|
|
|
259
259
|
|
|
260
260
|
await execa(
|
|
261
261
|
packageManager,
|
|
262
|
-
[
|
|
262
|
+
[
|
|
263
|
+
packageManager === 'npm' ? 'i' : 'add',
|
|
264
|
+
packageManager === 'npm' ? '--save-dev' : '-D',
|
|
265
|
+
...PROJECT_DEV_DEPENDENCIES,
|
|
266
|
+
],
|
|
263
267
|
{
|
|
264
268
|
cwd,
|
|
265
269
|
},
|
package/src/utils/tokens.ts
CHANGED
|
@@ -460,24 +460,28 @@ export const tailwindColorsHex = {
|
|
|
460
460
|
};
|
|
461
461
|
|
|
462
462
|
export const tailwindColorsRgb = Object.fromEntries(
|
|
463
|
-
Object.entries(tailwindColorsHex).map(([colorName,
|
|
463
|
+
Object.entries(tailwindColorsHex).map(([colorName, shadesOrString]) => [
|
|
464
464
|
colorName,
|
|
465
|
-
|
|
466
|
-
Object.
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
465
|
+
typeof shadesOrString === 'object'
|
|
466
|
+
? Object.fromEntries(
|
|
467
|
+
Object.entries(shadesOrString).map(([shade, channel]) => {
|
|
468
|
+
return [shade, `rgb(${channel})`];
|
|
469
|
+
}),
|
|
470
|
+
)
|
|
471
|
+
: shadesOrString,
|
|
470
472
|
]),
|
|
471
473
|
);
|
|
472
474
|
|
|
473
475
|
export const tailwindColorsHsl = Object.fromEntries(
|
|
474
|
-
Object.entries(tailwindColorsHex).map(([colorName,
|
|
476
|
+
Object.entries(tailwindColorsHex).map(([colorName, shadesOrString]) => [
|
|
475
477
|
colorName,
|
|
476
|
-
|
|
477
|
-
Object.
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
478
|
+
typeof shadesOrString === 'object'
|
|
479
|
+
? Object.fromEntries(
|
|
480
|
+
Object.entries(shadesOrString).map(([shade, channel]) => {
|
|
481
|
+
return [shade, `hsl(${channel})`];
|
|
482
|
+
}),
|
|
483
|
+
)
|
|
484
|
+
: shadesOrString,
|
|
481
485
|
]),
|
|
482
486
|
);
|
|
483
487
|
|