ikoncomponents 1.5.0 → 1.5.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 (3) hide show
  1. package/bin.js +9 -1
  2. package/dist/index.js +12 -1
  3. package/package.json +1 -1
package/bin.js CHANGED
@@ -1,2 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import "./dist/index.js"
2
+
3
+ import { fileURLToPath } from "url";
4
+ import path from "path";
5
+
6
+ const __filename = fileURLToPath(import.meta.url);
7
+ const __dirname = path.dirname(__filename);
8
+
9
+ // load CLI entry
10
+ import("./dist/index.js");
package/dist/index.js CHANGED
@@ -1,3 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import { init } from "./commands/init.js";
3
- init();
3
+ const args = process.argv.slice(2);
4
+ if (args[0] === "init") {
5
+ init();
6
+ }
7
+ else {
8
+ console.log(`
9
+ ikoncomponents CLI
10
+
11
+ Usage:
12
+ npx ikoncomponents init
13
+ `);
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ikoncomponents",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "ikoncomponents": "./bin.js"