node-power-user 0.0.3 → 0.0.8
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 +7 -7
- package/package.json +3 -3
- package/src/cli.js +4 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<a href="https://cdn.itwcreativeworks.com/assets/itw-creative-works/images/logo/itw-creative-works-brandmark-black-x.svg">
|
|
3
|
-
<img src="https://cdn.itwcreativeworks.com/assets/itw-creative-works/images/logo/itw-creative-works-brandmark-black-x.svg">
|
|
3
|
+
<img src="https://cdn.itwcreativeworks.com/assets/itw-creative-works/images/logo/itw-creative-works-brandmark-black-x.svg" width="100px">
|
|
4
4
|
</a>
|
|
5
5
|
</p>
|
|
6
6
|
|
|
@@ -42,12 +42,12 @@ After installing via NPM, you can use the CLI with the `npu` command.
|
|
|
42
42
|
## Example CLI Usage
|
|
43
43
|
Note: you may have to run cli commands with `npx npu <command>` if you install this package locally.
|
|
44
44
|
* `npu v`: Check version of node-power-user.
|
|
45
|
-
* `npu pv`: Check version of the current project
|
|
46
|
-
* `npu clean`: Clean your node project (runs `rm -fr node_modules && rm -fr package-lock.json && npm cache clean --force && npm install && npm rb`)
|
|
47
|
-
* `npu bump`: Bump your project's version
|
|
48
|
-
* `npu bump 1`: Bump the last number (`patch` version)
|
|
49
|
-
* `npu bump 2`: Bump the middle number (`minor` version)
|
|
50
|
-
* `npu bump 3`: Bump the first number (`major` version)
|
|
45
|
+
* `npu pv`: Check version of the current project.
|
|
46
|
+
* `npu clean`: Clean your node project (runs `rm -fr node_modules && rm -fr package-lock.json && npm cache clean --force && npm install && npm rb`).
|
|
47
|
+
* `npu bump`: Bump your project's version.
|
|
48
|
+
* `npu bump 1`: Bump the last number (`patch` version).
|
|
49
|
+
* `npu bump 2`: Bump the middle number (`minor` version).
|
|
50
|
+
* `npu bump 3`: Bump the first number (`major` version).
|
|
51
51
|
|
|
52
52
|
## Final Words
|
|
53
53
|
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-power-user",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.8",
|
|
4
|
+
"description": "Easy tools for every Node.js developer!",
|
|
5
5
|
"main": "./src/cli.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"npu": "./bin/npu",
|
|
@@ -40,4 +40,4 @@
|
|
|
40
40
|
"bin/",
|
|
41
41
|
"src/"
|
|
42
42
|
]
|
|
43
|
-
}
|
|
43
|
+
}
|
package/src/cli.js
CHANGED
|
@@ -36,15 +36,16 @@ Main.prototype.process = async function (args) {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
if (self.options.v || self.options.version || self.options['-v'] || self.options['-version']) {
|
|
39
|
-
return console.log(chalk.blue(`Node Power User is
|
|
39
|
+
return console.log(chalk.blue(`Node Power User is v${chalk.bold(self.npu_packageJSON.version)}`));
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
if (self.options.pv || self.options['project-version'] || self.options.project) {
|
|
43
|
-
return console.log(chalk.blue(`The current project (${chalk.bold(self.proj_packageJSON.name)}) is ${chalk.bold(self.proj_packageJSON.version)}`));
|
|
43
|
+
return console.log(chalk.blue(`The current project (${chalk.bold(self.proj_packageJSON.name)}) is v${chalk.bold(self.proj_packageJSON.version)}`));
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
if (self.options.clean) {
|
|
47
|
-
const
|
|
47
|
+
const NPM_INSTALL_FLAG = self.options['--no-optional'] || self.options['-no-optional'] || self.options['no-optional'] ? '--no-optional' : ''
|
|
48
|
+
const NPM_CLEAN = `rm -fr node_modules && rm -fr package-lock.json && npm cache clean --force && npm install ${NPM_INSTALL_FLAG} && npm rb`;
|
|
48
49
|
console.log(chalk.blue(`Running: ${NPM_CLEAN}...`));
|
|
49
50
|
return await asyncCommand(NPM_CLEAN)
|
|
50
51
|
.then(r => {
|