@aakaar/cli 0.0.1 → 0.0.3
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.cjs +11 -3
- package/dist/index.js +11 -3
- package/package.json +4 -10
package/dist/index.cjs
CHANGED
|
@@ -130,6 +130,7 @@ var setup = new import_commander2.Command().name("setup").description("setup the
|
|
|
130
130
|
},
|
|
131
131
|
tokens: {
|
|
132
132
|
color: "a42700",
|
|
133
|
+
strategy: "harmony",
|
|
133
134
|
output: "src/design/css"
|
|
134
135
|
},
|
|
135
136
|
react: {
|
|
@@ -203,12 +204,19 @@ var import_commander3 = require("commander");
|
|
|
203
204
|
var token = new import_commander3.Command().name("token").description("build design tokens for your project").option(
|
|
204
205
|
"-c, --color <color>",
|
|
205
206
|
"Hex code of the source color, example, 006875. If it is not provided, the default color is used i.e. 006875"
|
|
206
|
-
).option("-o, --output <output>", "Output path for generated tokens.").
|
|
207
|
+
).option("-o, --output <output>", "Output path for generated tokens.").option(
|
|
208
|
+
"-s, --strategy <strategy>",
|
|
209
|
+
"Color generation strategy: 'material' or 'harmony'. Default is 'harmony'",
|
|
210
|
+
"harmony"
|
|
211
|
+
).action(async ({ color, output, strategy }) => {
|
|
207
212
|
verify();
|
|
208
213
|
const finalColor = color || config.tokens.color;
|
|
214
|
+
const finalStrategy = strategy || config.tokens.strategy;
|
|
209
215
|
const finalOutput = output || config.tokens.output;
|
|
210
|
-
console.log(
|
|
211
|
-
|
|
216
|
+
console.log(
|
|
217
|
+
`Generating tokens for color: ${finalColor} using ${finalStrategy} strategy`
|
|
218
|
+
);
|
|
219
|
+
const cssOutput = (0, import_dictionary.runCss)(`#${finalColor}`, finalStrategy);
|
|
212
220
|
if (!(0, import_node_fs5.existsSync)(finalOutput)) {
|
|
213
221
|
(0, import_node_fs5.mkdirSync)(finalOutput, {
|
|
214
222
|
recursive: true
|
package/dist/index.js
CHANGED
|
@@ -129,6 +129,7 @@ var setup = new Command2().name("setup").description("setup the aakaar ui").acti
|
|
|
129
129
|
},
|
|
130
130
|
tokens: {
|
|
131
131
|
color: "a42700",
|
|
132
|
+
strategy: "harmony",
|
|
132
133
|
output: "src/design/css"
|
|
133
134
|
},
|
|
134
135
|
react: {
|
|
@@ -202,12 +203,19 @@ import { Command as Command3 } from "commander";
|
|
|
202
203
|
var token = new Command3().name("token").description("build design tokens for your project").option(
|
|
203
204
|
"-c, --color <color>",
|
|
204
205
|
"Hex code of the source color, example, 006875. If it is not provided, the default color is used i.e. 006875"
|
|
205
|
-
).option("-o, --output <output>", "Output path for generated tokens.").
|
|
206
|
+
).option("-o, --output <output>", "Output path for generated tokens.").option(
|
|
207
|
+
"-s, --strategy <strategy>",
|
|
208
|
+
"Color generation strategy: 'material' or 'harmony'. Default is 'harmony'",
|
|
209
|
+
"harmony"
|
|
210
|
+
).action(async ({ color, output, strategy }) => {
|
|
206
211
|
verify();
|
|
207
212
|
const finalColor = color || config.tokens.color;
|
|
213
|
+
const finalStrategy = strategy || config.tokens.strategy;
|
|
208
214
|
const finalOutput = output || config.tokens.output;
|
|
209
|
-
console.log(
|
|
210
|
-
|
|
215
|
+
console.log(
|
|
216
|
+
`Generating tokens for color: ${finalColor} using ${finalStrategy} strategy`
|
|
217
|
+
);
|
|
218
|
+
const cssOutput = runCss(`#${finalColor}`, finalStrategy);
|
|
211
219
|
if (!existsSync4(finalOutput)) {
|
|
212
220
|
mkdirSync3(finalOutput, {
|
|
213
221
|
recursive: true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aakaar/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -23,14 +23,8 @@
|
|
|
23
23
|
"commander": "^12.1.0",
|
|
24
24
|
"execa": "^9.6.0",
|
|
25
25
|
"signal-exit": "^4.1.0",
|
|
26
|
-
"@aakaar/dictionary": "0.0.
|
|
27
|
-
"@aakaar/global": "0.0.
|
|
28
|
-
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"@biomejs/biome": "^1.9.4",
|
|
31
|
-
"@tsconfig/node22": "^22.0.2",
|
|
32
|
-
"tsup": "^8.0.0",
|
|
33
|
-
"typescript": "^5.0.0"
|
|
26
|
+
"@aakaar/dictionary": "0.0.3",
|
|
27
|
+
"@aakaar/global": "0.0.3"
|
|
34
28
|
},
|
|
35
29
|
"scripts": {
|
|
36
30
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|
|
@@ -39,6 +33,6 @@
|
|
|
39
33
|
"dev": "tsup src/index.ts --watch --format esm,cjs --dts",
|
|
40
34
|
"ts": "tsc --noEmit",
|
|
41
35
|
"publish:internet": "pnpm publish --access public",
|
|
42
|
-
"publish:local": "pnpm publish --registry http://localhost:4873"
|
|
36
|
+
"publish:local": "pnpm publish --registry http://localhost:4873 --git-checks=false"
|
|
43
37
|
}
|
|
44
38
|
}
|