kmod-cli 1.4.12 → 1.4.13

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 (2) hide show
  1. package/bin/index.js +12 -5
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -183,16 +183,23 @@ program
183
183
  .description("CLI to copy component/templates into project")
184
184
  .version("1.0.0");
185
185
 
186
- program.command("add").description("Select components to add").action(addComponents);
186
+ // program.command("add").description("Select components to add").action(addComponents);
187
187
  program
188
188
  .command("add [components...]")
189
- .description("Add components by name or select interactively")
190
- .action(async (components) => {
189
+ .description("Add components")
190
+ .option("--all", "Add all components")
191
+ .action(async (components = [], options) => {
192
+ if (options.all) {
193
+ await addComponents(); //handle --all
194
+ return;
195
+ }
196
+
191
197
  if (components.length > 0) {
192
198
  await addComponentsByName(components);
193
- } else {
194
- await addComponents();
199
+ return;
195
200
  }
201
+
202
+ await addComponents(); // interactive
196
203
  });
197
204
 
198
205
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kmod-cli",
3
- "version": "1.4.12",
3
+ "version": "1.4.13",
4
4
  "description": "Stack components utilities fast setup in projects",
5
5
  "author": "kumo_d",
6
6
  "license": "MIT",