@iconoma/cli 0.0.1-beta.1

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 (40) hide show
  1. package/README.md +374 -0
  2. package/bin/run.cmd +3 -0
  3. package/bin/run.js +5 -0
  4. package/dist/commands/studio.d.ts +11 -0
  5. package/dist/commands/studio.d.ts.map +1 -0
  6. package/dist/commands/studio.js +34 -0
  7. package/dist/get-studio.d.ts +9 -0
  8. package/dist/get-studio.d.ts.map +1 -0
  9. package/dist/get-studio.js +4 -0
  10. package/dist/index.d.ts +2 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +1 -0
  13. package/dist/studio/128.index.js +55 -0
  14. package/dist/studio/143.index.js +2457 -0
  15. package/dist/studio/148.index.js +744 -0
  16. package/dist/studio/211.index.js +47186 -0
  17. package/dist/studio/22.index.js +5942 -0
  18. package/dist/studio/437.index.js +20 -0
  19. package/dist/studio/509.index.js +2240 -0
  20. package/dist/studio/533.index.js +883 -0
  21. package/dist/studio/537.index.js +62 -0
  22. package/dist/studio/542.index.js +22 -0
  23. package/dist/studio/543.index.js +8172 -0
  24. package/dist/studio/593.index.js +38099 -0
  25. package/dist/studio/777.index.js +24 -0
  26. package/dist/studio/786.index.js +1065 -0
  27. package/dist/studio/860.index.js +13 -0
  28. package/dist/studio/876.index.js +3848 -0
  29. package/dist/studio/940.index.js +6772 -0
  30. package/dist/studio/951.index.js +98 -0
  31. package/dist/studio/c4c9b2153fb0d143f75f.js +1 -0
  32. package/dist/studio/client/assets/index-BD3Y-97G.css +2 -0
  33. package/dist/studio/client/assets/index-Dk8OjIgh.js +53 -0
  34. package/dist/studio/client/favicon.ico +0 -0
  35. package/dist/studio/client/index.html +21 -0
  36. package/dist/studio/index.js +22188 -0
  37. package/dist/studio/package.json +3 -0
  38. package/dist/tsconfig.tsbuildinfo +1 -0
  39. package/oclif.manifest.json +37 -0
  40. package/package.json +75 -0
package/README.md ADDED
@@ -0,0 +1,374 @@
1
+ @iconoma/cli
2
+ =================
3
+
4
+ A developer-friendly tool to manage and organize icons through CLI and web studio
5
+
6
+
7
+ [![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
8
+ [![Version](https://img.shields.io/npm/v/@iconoma/cli.svg)](https://npmjs.org/package/@iconoma/cli)
9
+ [![Downloads/week](https://img.shields.io/npm/dw/@iconoma/cli.svg)](https://npmjs.org/package/@iconoma/cli)
10
+
11
+
12
+ <!-- toc -->
13
+ * [Usage](#usage)
14
+ * [Commands](#commands)
15
+ <!-- tocstop -->
16
+ # Usage
17
+ <!-- usage -->
18
+ ```sh-session
19
+ $ npm install -g @iconoma/cli
20
+ $ iconoma COMMAND
21
+ running command...
22
+ $ iconoma (--version)
23
+ @iconoma/cli/0.0.1-beta.1 linux-x64 node-v20.19.6
24
+ $ iconoma --help [COMMAND]
25
+ USAGE
26
+ $ iconoma COMMAND
27
+ ...
28
+ ```
29
+ <!-- usagestop -->
30
+ # Commands
31
+ <!-- commands -->
32
+ * [`iconoma help [COMMAND]`](#iconoma-help-command)
33
+ * [`iconoma plugins`](#iconoma-plugins)
34
+ * [`iconoma plugins add PLUGIN`](#iconoma-plugins-add-plugin)
35
+ * [`iconoma plugins:inspect PLUGIN...`](#iconoma-pluginsinspect-plugin)
36
+ * [`iconoma plugins install PLUGIN`](#iconoma-plugins-install-plugin)
37
+ * [`iconoma plugins link PATH`](#iconoma-plugins-link-path)
38
+ * [`iconoma plugins remove [PLUGIN]`](#iconoma-plugins-remove-plugin)
39
+ * [`iconoma plugins reset`](#iconoma-plugins-reset)
40
+ * [`iconoma plugins uninstall [PLUGIN]`](#iconoma-plugins-uninstall-plugin)
41
+ * [`iconoma plugins unlink [PLUGIN]`](#iconoma-plugins-unlink-plugin)
42
+ * [`iconoma plugins update`](#iconoma-plugins-update)
43
+ * [`iconoma studio`](#iconoma-studio)
44
+
45
+ ## `iconoma help [COMMAND]`
46
+
47
+ Display help for iconoma.
48
+
49
+ ```
50
+ USAGE
51
+ $ iconoma help [COMMAND...] [-n]
52
+
53
+ ARGUMENTS
54
+ [COMMAND...] Command to show help for.
55
+
56
+ FLAGS
57
+ -n, --nested-commands Include all nested commands in the output.
58
+
59
+ DESCRIPTION
60
+ Display help for iconoma.
61
+ ```
62
+
63
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.36/src/commands/help.ts)_
64
+
65
+ ## `iconoma plugins`
66
+
67
+ List installed plugins.
68
+
69
+ ```
70
+ USAGE
71
+ $ iconoma plugins [--json] [--core]
72
+
73
+ FLAGS
74
+ --core Show core plugins.
75
+
76
+ GLOBAL FLAGS
77
+ --json Format output as json.
78
+
79
+ DESCRIPTION
80
+ List installed plugins.
81
+
82
+ EXAMPLES
83
+ $ iconoma plugins
84
+ ```
85
+
86
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/index.ts)_
87
+
88
+ ## `iconoma plugins add PLUGIN`
89
+
90
+ Installs a plugin into iconoma.
91
+
92
+ ```
93
+ USAGE
94
+ $ iconoma plugins add PLUGIN... [--json] [-f] [-h] [-s | -v]
95
+
96
+ ARGUMENTS
97
+ PLUGIN... Plugin to install.
98
+
99
+ FLAGS
100
+ -f, --force Force npm to fetch remote resources even if a local copy exists on disk.
101
+ -h, --help Show CLI help.
102
+ -s, --silent Silences npm output.
103
+ -v, --verbose Show verbose npm output.
104
+
105
+ GLOBAL FLAGS
106
+ --json Format output as json.
107
+
108
+ DESCRIPTION
109
+ Installs a plugin into iconoma.
110
+
111
+ Uses npm to install plugins.
112
+
113
+ Installation of a user-installed plugin will override a core plugin.
114
+
115
+ Use the ICONOMA_NPM_LOG_LEVEL environment variable to set the npm loglevel.
116
+ Use the ICONOMA_NPM_REGISTRY environment variable to set the npm registry.
117
+
118
+ ALIASES
119
+ $ iconoma plugins add
120
+
121
+ EXAMPLES
122
+ Install a plugin from npm registry.
123
+
124
+ $ iconoma plugins add myplugin
125
+
126
+ Install a plugin from a github url.
127
+
128
+ $ iconoma plugins add https://github.com/someuser/someplugin
129
+
130
+ Install a plugin from a github slug.
131
+
132
+ $ iconoma plugins add someuser/someplugin
133
+ ```
134
+
135
+ ## `iconoma plugins:inspect PLUGIN...`
136
+
137
+ Displays installation properties of a plugin.
138
+
139
+ ```
140
+ USAGE
141
+ $ iconoma plugins inspect PLUGIN...
142
+
143
+ ARGUMENTS
144
+ PLUGIN... [default: .] Plugin to inspect.
145
+
146
+ FLAGS
147
+ -h, --help Show CLI help.
148
+ -v, --verbose
149
+
150
+ GLOBAL FLAGS
151
+ --json Format output as json.
152
+
153
+ DESCRIPTION
154
+ Displays installation properties of a plugin.
155
+
156
+ EXAMPLES
157
+ $ iconoma plugins inspect myplugin
158
+ ```
159
+
160
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/inspect.ts)_
161
+
162
+ ## `iconoma plugins install PLUGIN`
163
+
164
+ Installs a plugin into iconoma.
165
+
166
+ ```
167
+ USAGE
168
+ $ iconoma plugins install PLUGIN... [--json] [-f] [-h] [-s | -v]
169
+
170
+ ARGUMENTS
171
+ PLUGIN... Plugin to install.
172
+
173
+ FLAGS
174
+ -f, --force Force npm to fetch remote resources even if a local copy exists on disk.
175
+ -h, --help Show CLI help.
176
+ -s, --silent Silences npm output.
177
+ -v, --verbose Show verbose npm output.
178
+
179
+ GLOBAL FLAGS
180
+ --json Format output as json.
181
+
182
+ DESCRIPTION
183
+ Installs a plugin into iconoma.
184
+
185
+ Uses npm to install plugins.
186
+
187
+ Installation of a user-installed plugin will override a core plugin.
188
+
189
+ Use the ICONOMA_NPM_LOG_LEVEL environment variable to set the npm loglevel.
190
+ Use the ICONOMA_NPM_REGISTRY environment variable to set the npm registry.
191
+
192
+ ALIASES
193
+ $ iconoma plugins add
194
+
195
+ EXAMPLES
196
+ Install a plugin from npm registry.
197
+
198
+ $ iconoma plugins install myplugin
199
+
200
+ Install a plugin from a github url.
201
+
202
+ $ iconoma plugins install https://github.com/someuser/someplugin
203
+
204
+ Install a plugin from a github slug.
205
+
206
+ $ iconoma plugins install someuser/someplugin
207
+ ```
208
+
209
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/install.ts)_
210
+
211
+ ## `iconoma plugins link PATH`
212
+
213
+ Links a plugin into the CLI for development.
214
+
215
+ ```
216
+ USAGE
217
+ $ iconoma plugins link PATH [-h] [--install] [-v]
218
+
219
+ ARGUMENTS
220
+ PATH [default: .] path to plugin
221
+
222
+ FLAGS
223
+ -h, --help Show CLI help.
224
+ -v, --verbose
225
+ --[no-]install Install dependencies after linking the plugin.
226
+
227
+ DESCRIPTION
228
+ Links a plugin into the CLI for development.
229
+
230
+ Installation of a linked plugin will override a user-installed or core plugin.
231
+
232
+ e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
233
+ command will override the user-installed or core plugin implementation. This is useful for development work.
234
+
235
+
236
+ EXAMPLES
237
+ $ iconoma plugins link myplugin
238
+ ```
239
+
240
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/link.ts)_
241
+
242
+ ## `iconoma plugins remove [PLUGIN]`
243
+
244
+ Removes a plugin from the CLI.
245
+
246
+ ```
247
+ USAGE
248
+ $ iconoma plugins remove [PLUGIN...] [-h] [-v]
249
+
250
+ ARGUMENTS
251
+ [PLUGIN...] plugin to uninstall
252
+
253
+ FLAGS
254
+ -h, --help Show CLI help.
255
+ -v, --verbose
256
+
257
+ DESCRIPTION
258
+ Removes a plugin from the CLI.
259
+
260
+ ALIASES
261
+ $ iconoma plugins unlink
262
+ $ iconoma plugins remove
263
+
264
+ EXAMPLES
265
+ $ iconoma plugins remove myplugin
266
+ ```
267
+
268
+ ## `iconoma plugins reset`
269
+
270
+ Remove all user-installed and linked plugins.
271
+
272
+ ```
273
+ USAGE
274
+ $ iconoma plugins reset [--hard] [--reinstall]
275
+
276
+ FLAGS
277
+ --hard Delete node_modules and package manager related files in addition to uninstalling plugins.
278
+ --reinstall Reinstall all plugins after uninstalling.
279
+ ```
280
+
281
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/reset.ts)_
282
+
283
+ ## `iconoma plugins uninstall [PLUGIN]`
284
+
285
+ Removes a plugin from the CLI.
286
+
287
+ ```
288
+ USAGE
289
+ $ iconoma plugins uninstall [PLUGIN...] [-h] [-v]
290
+
291
+ ARGUMENTS
292
+ [PLUGIN...] plugin to uninstall
293
+
294
+ FLAGS
295
+ -h, --help Show CLI help.
296
+ -v, --verbose
297
+
298
+ DESCRIPTION
299
+ Removes a plugin from the CLI.
300
+
301
+ ALIASES
302
+ $ iconoma plugins unlink
303
+ $ iconoma plugins remove
304
+
305
+ EXAMPLES
306
+ $ iconoma plugins uninstall myplugin
307
+ ```
308
+
309
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/uninstall.ts)_
310
+
311
+ ## `iconoma plugins unlink [PLUGIN]`
312
+
313
+ Removes a plugin from the CLI.
314
+
315
+ ```
316
+ USAGE
317
+ $ iconoma plugins unlink [PLUGIN...] [-h] [-v]
318
+
319
+ ARGUMENTS
320
+ [PLUGIN...] plugin to uninstall
321
+
322
+ FLAGS
323
+ -h, --help Show CLI help.
324
+ -v, --verbose
325
+
326
+ DESCRIPTION
327
+ Removes a plugin from the CLI.
328
+
329
+ ALIASES
330
+ $ iconoma plugins unlink
331
+ $ iconoma plugins remove
332
+
333
+ EXAMPLES
334
+ $ iconoma plugins unlink myplugin
335
+ ```
336
+
337
+ ## `iconoma plugins update`
338
+
339
+ Update installed plugins.
340
+
341
+ ```
342
+ USAGE
343
+ $ iconoma plugins update [-h] [-v]
344
+
345
+ FLAGS
346
+ -h, --help Show CLI help.
347
+ -v, --verbose
348
+
349
+ DESCRIPTION
350
+ Update installed plugins.
351
+ ```
352
+
353
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/update.ts)_
354
+
355
+ ## `iconoma studio`
356
+
357
+ Start the Iconoma Studio
358
+
359
+ ```
360
+ USAGE
361
+ $ iconoma studio [-p <value>]
362
+
363
+ FLAGS
364
+ -p, --port=<value> port to listen on
365
+
366
+ DESCRIPTION
367
+ Start the Iconoma Studio
368
+
369
+ EXAMPLES
370
+ $ iconoma studio
371
+ ```
372
+
373
+ _See code: [src/commands/studio.ts](https://github.com/theryston/iconoma/blob/v0.0.1-beta.1/src/commands/studio.ts)_
374
+ <!-- commandsstop -->
package/bin/run.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node "%~dp0\run" %*
package/bin/run.js ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { execute } from "@oclif/core";
4
+
5
+ await execute({ dir: import.meta.url });
@@ -0,0 +1,11 @@
1
+ import { Command } from "@oclif/core";
2
+ export default class Studio extends Command {
3
+ static args: {};
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ port: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
+ };
9
+ run(): Promise<void>;
10
+ }
11
+ //# sourceMappingURL=studio.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,34 @@
1
+ import { Command, Flags } from "@oclif/core";
2
+ import { getStudio } from "../get-studio.js";
3
+ import figlet from "figlet";
4
+ import gradient from "gradient-string";
5
+ import { createSpinner } from "nanospinner";
6
+ import open from "open";
7
+ export default class Studio extends Command {
8
+ static args = {};
9
+ static description = "Start the Iconoma Studio";
10
+ static examples = ["<%= config.bin %> <%= command.id %>"];
11
+ static flags = {
12
+ port: Flags.string({ char: "p", description: "port to listen on" }),
13
+ };
14
+ async run() {
15
+ const { flags } = await this.parse(Studio);
16
+ const port = Number(flags.port) || undefined;
17
+ console.clear();
18
+ await new Promise((resolve) => setTimeout(resolve, 100));
19
+ const text = await figlet.text("Iconoma Studio");
20
+ const coolGradient = gradient(["#e5e5e5", "#1447e6"]);
21
+ console.log(coolGradient.multiline(text));
22
+ const spinner = createSpinner("Starting Studio...").start();
23
+ try {
24
+ const { createServer } = await getStudio();
25
+ const { url } = await createServer({ port });
26
+ await open(url, { wait: true });
27
+ spinner.success({ text: `Studio started at ${url}` });
28
+ }
29
+ catch {
30
+ spinner.error({ text: `Failed to start Studio` });
31
+ process.exit(1);
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,9 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,4 @@
1
+ export async function getStudio() {
2
+ const studioPath = "./studio/index.js";
3
+ return import(studioPath);
4
+ }
@@ -0,0 +1,2 @@
1
+ export { run } from '@oclif/core';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export { run } from '@oclif/core';