node-power-user 0.0.29 → 0.0.30

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/README.md CHANGED
@@ -49,7 +49,9 @@ Note: you may have to run cli commands with `npx npu <command>` if you install t
49
49
  * `npu bump 3`: Bump the first number (`major` version).
50
50
  * `npu outdated`: Compare the versions of installed modules to those in your package.json
51
51
  * `npu global`: List all global packages for all versions of Node.js on your machine (must use NVM).
52
- * `npu --wait`: Wait the specified amount of time in milliseconds.
52
+ ### Flags
53
+ * `--wait`: Wait the specified amount of time in milliseconds.
54
+ * `--debug`: Log the commands and flags before they are executed
53
55
 
54
56
  ## Final Words
55
57
  If you are still having difficulty, we would love for you to post a question to [the Node Power User issues page](https://github.com/itw-creative-works/node-power-user/issues). It is much easier to answer questions that include your code and relevant files! So if you can provide them, we'd be extremely grateful (and more likely to help you find the answer!)
package/dist/index.js CHANGED
@@ -68,6 +68,13 @@ const self = this;
68
68
  console.log('options:', self.options);
69
69
  }
70
70
 
71
+ if (self.options['wait'] || self.options['--wait']) {
72
+ const time = parseInt(self.options['wait'] || self.options['--wait'] || 1000);
73
+ self.log(chalk.blue(`Waiting ${time}...`));
74
+ await powertools.wait(time);
75
+ self.log(chalk.green(`Done waiting`));
76
+ }
77
+
71
78
  if (self.options.v || self.options.version || self.options['-v'] || self.options['--version']) {
72
79
  self.log(chalk.blue(`Node Power User is v${chalk.bold(self.npu_packageJSON.version)}`));
73
80
  return self.npu_packageJSON.version;
@@ -296,12 +303,6 @@ const self = this;
296
303
  return bump(self);
297
304
  }
298
305
 
299
- if (self.options['wait'] || self.options['--wait']) {
300
- const time = parseInt(self.options['wait'] || self.options['--wait'] || 1000);
301
- self.log(chalk.blue(`Waiting ${time}...`));
302
- await powertools.wait(time);
303
- self.log(chalk.green(`Done waiting`));
304
- }
305
306
  };
306
307
 
307
308
  Main.prototype.log = function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-power-user",
3
- "version": "0.0.29",
3
+ "version": "0.0.30",
4
4
  "description": "Easy tools for every Node.js developer!",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -68,6 +68,13 @@ const self = this;
68
68
  console.log('options:', self.options);
69
69
  }
70
70
 
71
+ if (self.options['wait'] || self.options['--wait']) {
72
+ const time = parseInt(self.options['wait'] || self.options['--wait'] || 1000);
73
+ self.log(chalk.blue(`Waiting ${time}...`));
74
+ await powertools.wait(time);
75
+ self.log(chalk.green(`Done waiting`));
76
+ }
77
+
71
78
  if (self.options.v || self.options.version || self.options['-v'] || self.options['--version']) {
72
79
  self.log(chalk.blue(`Node Power User is v${chalk.bold(self.npu_packageJSON.version)}`));
73
80
  return self.npu_packageJSON.version;
@@ -296,12 +303,6 @@ const self = this;
296
303
  return bump(self);
297
304
  }
298
305
 
299
- if (self.options['wait'] || self.options['--wait']) {
300
- const time = parseInt(self.options['wait'] || self.options['--wait'] || 1000);
301
- self.log(chalk.blue(`Waiting ${time}...`));
302
- await powertools.wait(time);
303
- self.log(chalk.green(`Done waiting`));
304
- }
305
306
  };
306
307
 
307
308
  Main.prototype.log = function () {