@iconoma/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.
Files changed (45) hide show
  1. package/README.md +91 -91
  2. package/bin/run.js +0 -0
  3. package/dist/commands/studio.d.ts.map +1 -1
  4. package/dist/commands/studio.js +3 -3
  5. package/dist/tsconfig.tsbuildinfo +1 -1
  6. package/package.json +26 -13
  7. package/dist/get-studio.d.ts +0 -9
  8. package/dist/get-studio.d.ts.map +0 -1
  9. package/dist/get-studio.js +0 -4
  10. package/dist/studio/128.index.js +0 -55
  11. package/dist/studio/143.index.js +0 -2457
  12. package/dist/studio/148.index.js +0 -744
  13. package/dist/studio/211.index.js +0 -47186
  14. package/dist/studio/22.index.js +0 -5942
  15. package/dist/studio/259.index.js +0 -7397
  16. package/dist/studio/437.index.js +0 -20
  17. package/dist/studio/454.index.js +0 -295
  18. package/dist/studio/47.index.js +0 -1431
  19. package/dist/studio/509.index.js +0 -2240
  20. package/dist/studio/533.index.js +0 -883
  21. package/dist/studio/537.index.js +0 -62
  22. package/dist/studio/542.index.js +0 -22
  23. package/dist/studio/543.index.js +0 -6603
  24. package/dist/studio/777.index.js +0 -24
  25. package/dist/studio/786.index.js +0 -1065
  26. package/dist/studio/860.index.js +0 -13
  27. package/dist/studio/876.index.js +0 -38613
  28. package/dist/studio/922.index.js +0 -78317
  29. package/dist/studio/940.index.js +0 -6772
  30. package/dist/studio/942.index.js +0 -8218
  31. package/dist/studio/951.index.js +0 -98
  32. package/dist/studio/c4c9b2153fb0d143f75f.js +0 -1
  33. package/dist/studio/client/assets/base-80a1f760-DUOHyEl5.js +0 -1
  34. package/dist/studio/client/assets/consoleHook-59e792cb-jD7_jZ5v.js +0 -2
  35. package/dist/studio/client/assets/index-599aeaf7-B2yLv6MY.js +0 -16
  36. package/dist/studio/client/assets/index-RLDlFy_p.js +0 -810
  37. package/dist/studio/client/assets/index-iqn0_0ft.css +0 -1
  38. package/dist/studio/client/assets/node-BLCLUDWv.js +0 -4
  39. package/dist/studio/client/assets/runtime-BUwhFSj5.js +0 -1
  40. package/dist/studio/client/favicon.ico +0 -0
  41. package/dist/studio/client/icon.png +0 -0
  42. package/dist/studio/client/index.html +0 -21
  43. package/dist/studio/index.js +0 -277752
  44. package/dist/studio/package.json +0 -3
  45. package/oclif.manifest.json +0 -37
package/README.md CHANGED
@@ -1,91 +1,91 @@
1
- # Iconoma
2
-
3
- [![github](https://img.shields.io/badge/github-repo-blue?logo=github)](https://github.com/theryston/iconoma)
4
- [![Version](https://img.shields.io/npm/v/@iconoma/cli.svg)](https://npmjs.org/package/@iconoma/cli)
5
- [![Downloads/week](https://img.shields.io/npm/dw/@iconoma/cli.svg)](https://npmjs.org/package/@iconoma/cli)
6
-
7
- **Iconoma** is a complete **icon management system** (CLI + Studio) that helps teams and products **organize, standardize, version, and distribute icons** with a reliable workflow.
8
-
9
- Instead of keeping random SVG files scattered across the repo, Iconoma turns your icon library into a **structured, reproducible pipeline**: clean SVGs with SVGO, enforce consistency (colors, metadata, conventions), and generate the targets your apps need (SVG files, React components, React Native components).
10
-
11
- Start using it now by running this in your project:
12
-
13
- ```bash
14
- npx @iconoma/cli studio
15
- ```
16
-
17
- ---
18
-
19
- ## Why Iconoma
20
-
21
- Icon libraries tend to become messy as projects grow:
22
-
23
- - inconsistent sizes and alignment (icons "look bigger" even with the same size)
24
- - hardcoded colors that break themes/dark mode
25
- - duplicated icons with different names
26
- - manual export steps (time-consuming and error-prone)
27
- - multiple platforms needing different formats (Web + React + React Native)
28
-
29
- Iconoma solves that by providing a **single source of truth (the studio)** for your icon catalog and an automated build system.
30
-
31
- ---
32
-
33
- ## What you get
34
-
35
- ### ✅ Icon catalog with metadata
36
-
37
- Each icon can have:
38
-
39
- - a canonical **name**
40
- - **tags** for search and organization
41
- - optimized SVG content
42
- - generated outputs (targets)
43
-
44
- This makes it easy to keep icons discoverable and consistent across the team.
45
-
46
- ### ✅ SVGO optimization + custom configuration
47
-
48
- Iconoma uses **SVGO** to optimize and normalize your SVGs (removing unnecessary data, minimizing output, and improving consistency).
49
-
50
- You can **fully customize the SVGO config** to match your rules and design system (plugins, params, presets, etc.).
51
-
52
- ### ✅ Color mapping and theming-friendly icons
53
-
54
- SVGs frequently arrive with hardcoded colors like `#000`, `#111`, `white`, etc.
55
-
56
- Iconoma supports a **color map** approach so you can convert colors into:
57
-
58
- - `currentColor`
59
- - CSS variables/tokens (e.g. `var(--icons-secondary)`)
60
-
61
- This makes icons theme-friendly and prevents "random SVG colors" from leaking into your UI.
62
-
63
- ### ✅ Automatic target generation (React, React Native, SVG)
64
-
65
- Iconoma can automatically generate the targets you need, including:
66
-
67
- - **`.svg` files** (optimized/normalized)
68
- - **React components**
69
- - **React Native components**
70
-
71
- Targets are treated as build outputs, so you can keep a clean pipeline for multiple platforms.
72
-
73
- ### ✅ Lockfile-based reproducible builds
74
-
75
- Iconoma keeps a lockfile called `iconoma.lock.json` that stores:
76
-
77
- - SVG hashes
78
- - config hashes
79
- - target outputs and what they were built from
80
-
81
- This makes builds **deterministic**, helps you to understand the changes using Git.
82
-
83
- ### ✅ Studio (UI) integrated with the workflow
84
-
85
- Iconoma includes a "Studio" interface to make icon curation easier:
86
-
87
- - browse and search icons
88
- - preview icons in different sizes/themes
89
- - manage names/tags
90
- - validate consistency visually
91
- - run builds/transforms from a friendly UI
1
+ # Iconoma
2
+
3
+ [![github](https://img.shields.io/badge/github-repo-blue?logo=github)](https://github.com/theryston/iconoma)
4
+ [![Version](https://img.shields.io/npm/v/@iconoma/cli.svg)](https://npmjs.org/package/@iconoma/cli)
5
+ [![Downloads/week](https://img.shields.io/npm/dw/@iconoma/cli.svg)](https://npmjs.org/package/@iconoma/cli)
6
+
7
+ **Iconoma** is a complete **icon management system** (CLI + Studio) that helps teams and products **organize, standardize, version, and distribute icons** with a reliable workflow.
8
+
9
+ Instead of keeping random SVG files scattered across the repo, Iconoma turns your icon library into a **structured, reproducible pipeline**: clean SVGs with SVGO, enforce consistency (colors, metadata, conventions), and generate the targets your apps need (SVG files, React components, React Native components).
10
+
11
+ Start using it now by running this in your project:
12
+
13
+ ```bash
14
+ npx @iconoma/cli studio
15
+ ```
16
+
17
+ ---
18
+
19
+ ## Why Iconoma
20
+
21
+ Icon libraries tend to become messy as projects grow:
22
+
23
+ - inconsistent sizes and alignment (icons "look bigger" even with the same size)
24
+ - hardcoded colors that break themes/dark mode
25
+ - duplicated icons with different names
26
+ - manual export steps (time-consuming and error-prone)
27
+ - multiple platforms needing different formats (Web + React + React Native)
28
+
29
+ Iconoma solves that by providing a **single source of truth (the studio)** for your icon catalog and an automated build system.
30
+
31
+ ---
32
+
33
+ ## What you get
34
+
35
+ ### ✅ Icon catalog with metadata
36
+
37
+ Each icon can have:
38
+
39
+ - a canonical **name**
40
+ - **tags** for search and organization
41
+ - optimized SVG content
42
+ - generated outputs (targets)
43
+
44
+ This makes it easy to keep icons discoverable and consistent across the team.
45
+
46
+ ### ✅ SVGO optimization + custom configuration
47
+
48
+ Iconoma uses **SVGO** to optimize and normalize your SVGs (removing unnecessary data, minimizing output, and improving consistency).
49
+
50
+ You can **fully customize the SVGO config** to match your rules and design system (plugins, params, presets, etc.).
51
+
52
+ ### ✅ Color mapping and theming-friendly icons
53
+
54
+ SVGs frequently arrive with hardcoded colors like `#000`, `#111`, `white`, etc.
55
+
56
+ Iconoma supports a **color map** approach so you can convert colors into:
57
+
58
+ - `currentColor`
59
+ - CSS variables/tokens (e.g. `var(--icons-secondary)`)
60
+
61
+ This makes icons theme-friendly and prevents "random SVG colors" from leaking into your UI.
62
+
63
+ ### ✅ Automatic target generation (React, React Native, SVG)
64
+
65
+ Iconoma can automatically generate the targets you need, including:
66
+
67
+ - **`.svg` files** (optimized/normalized)
68
+ - **React components**
69
+ - **React Native components**
70
+
71
+ Targets are treated as build outputs, so you can keep a clean pipeline for multiple platforms.
72
+
73
+ ### ✅ Lockfile-based reproducible builds
74
+
75
+ Iconoma keeps a lockfile called `iconoma.lock.json` that stores:
76
+
77
+ - SVG hashes
78
+ - config hashes
79
+ - target outputs and what they were built from
80
+
81
+ This makes builds **deterministic**, helps you to understand the changes using Git.
82
+
83
+ ### ✅ Studio (UI) integrated with the workflow
84
+
85
+ Iconoma includes a "Studio" interface to make icon curation easier:
86
+
87
+ - browse and search icons
88
+ - preview icons in different sizes/themes
89
+ - manage names/tags
90
+ - validate consistency visually
91
+ - run builds/transforms from a friendly UI
package/bin/run.js CHANGED
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"studio.d.ts","sourceRoot":"","sources":["../../src/commands/studio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAC;AAO7C,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,OAAO;IACzC,OAAgB,IAAI,KAAM;IAC1B,OAAgB,WAAW,SAA8B;IACzD,OAAgB,QAAQ,WAA2C;IACnE,OAAgB,KAAK;;MAEnB;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA8BlC"}
1
+ {"version":3,"file":"studio.d.ts","sourceRoot":"","sources":["../../src/commands/studio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAC;AAO7C,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,OAAO;IACzC,OAAgB,IAAI,KAAM;IAC1B,OAAgB,WAAW,SAA8B;IACzD,OAAgB,QAAQ,WAA2C;IACnE,OAAgB,KAAK;;MAEnB;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA6BlC"}
@@ -1,5 +1,5 @@
1
1
  import { Command, Flags } from "@oclif/core";
2
- import { getStudio } from "../get-studio.js";
2
+ import { createServer } from "@iconoma/studio";
3
3
  import figlet from "figlet";
4
4
  import gradient from "gradient-string";
5
5
  import { createSpinner } from "nanospinner";
@@ -21,13 +21,13 @@ export default class Studio extends Command {
21
21
  console.log(coolGradient.multiline(text));
22
22
  const spinner = createSpinner("Starting Studio...").start();
23
23
  try {
24
- const { createServer } = await getStudio();
25
24
  const { url } = await createServer({ port });
26
25
  await open(url, { wait: true });
27
26
  spinner.success({ text: `Studio started at ${url}` });
28
27
  }
29
- catch {
28
+ catch (error) {
30
29
  spinner.error({ text: `Failed to start Studio` });
30
+ console.error(error);
31
31
  process.exit(1);
32
32
  }
33
33
  }
@@ -1 +1 @@
1
- {"root":["../src/get-studio.ts","../src/index.ts","../src/commands/studio.ts"],"version":"5.9.3"}
1
+ {"root":["../src/index.ts","../src/commands/studio.ts"],"version":"5.9.3"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@iconoma/cli",
3
3
  "description": "A developer-friendly tool to manage and organize icons through CLI and web studio",
4
- "version": "0.0.1",
4
+ "version": "0.0.3",
5
5
  "author": "Theryston Santos @Theryston",
6
6
  "bin": {
7
7
  "iconoma": "bin/run.js"
@@ -17,11 +17,10 @@
17
17
  "figlet": "^1.9.4",
18
18
  "gradient-string": "^3.0.0",
19
19
  "nanospinner": "^1.2.2",
20
- "open": "^11.0.0"
20
+ "open": "^11.0.0",
21
+ "@iconoma/studio": "0.0.5"
21
22
  },
22
23
  "devDependencies": {
23
- "@iconoma/eslint-config": "workspace:*",
24
- "@iconoma/typescript-config": "workspace:*",
25
24
  "@types/chai": "^4",
26
25
  "@types/mocha": "^10",
27
26
  "@types/node": "^18",
@@ -31,7 +30,9 @@
31
30
  "oclif": "^4",
32
31
  "shx": "^0.3.3",
33
32
  "ts-node": "^10",
34
- "typescript": "^5"
33
+ "typescript": "^5",
34
+ "@iconoma/typescript-config": "0.0.0",
35
+ "@iconoma/eslint-config": "0.0.0"
35
36
  },
36
37
  "engines": {
37
38
  "node": ">=18.0.0"
@@ -43,7 +44,22 @@
43
44
  ],
44
45
  "homepage": "https://github.com/theryston/iconoma",
45
46
  "keywords": [
46
- "oclif"
47
+ "oclif",
48
+ "iconoma",
49
+ "icon management",
50
+ "icons",
51
+ "studio",
52
+ "CLI",
53
+ "SVG",
54
+ "react",
55
+ "icon pipeline",
56
+ "icon optimizer",
57
+ "icon library",
58
+ "SVGO",
59
+ "design system",
60
+ "icon build",
61
+ "icon generator",
62
+ "react icons"
47
63
  ],
48
64
  "license": "MIT",
49
65
  "main": "dist/index.js",
@@ -66,12 +82,9 @@
66
82
  "type": "git",
67
83
  "url": "git+https://github.com/theryston/iconoma.git"
68
84
  },
85
+ "types": "dist/index.d.ts",
69
86
  "scripts": {
70
- "postbuild": "node scripts/bundle-studio.js",
71
87
  "build": "shx rm -rf dist && tsc -b",
72
- "lint": "eslint",
73
- "postpack": "shx rm -f oclif.manifest.json",
74
- "prepack": "oclif manifest"
75
- },
76
- "types": "dist/index.d.ts"
77
- }
88
+ "lint": "eslint"
89
+ }
90
+ }
@@ -1,9 +0,0 @@
1
- export declare function getStudio(): Promise<{
2
- createServer: (options: {
3
- port?: number;
4
- }) => Promise<{
5
- url: string;
6
- close: () => Promise<void>;
7
- }>;
8
- }>;
9
- //# sourceMappingURL=get-studio.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-studio.d.ts","sourceRoot":"","sources":["../src/get-studio.ts"],"names":[],"mappings":"AAAA,wBAAsB,SAAS,IAAI,OAAO,CAAC;IACzC,YAAY,EAAE,CAAC,OAAO,EAAE;QACtB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,KAAK,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;KAAE,CAAC,CAAC;CAC5D,CAAC,CAGD"}
@@ -1,4 +0,0 @@
1
- export async function getStudio() {
2
- const studioPath = "./studio/index.js";
3
- return import(studioPath);
4
- }