Skip to content

Commit e89525a

Browse files
committed
Fix #43: Shorter command alternative for interacting with node-mongo CLI needed
1 parent 5460a51 commit e89525a

File tree

3 files changed

+56
-45
lines changed

3 files changed

+56
-45
lines changed

package-lock.json

Lines changed: 42 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"main": "src/cli.js",
66
"bin": {
77
"@code-collabo/node-mongo-cli": "bin/create-node-mongo-project",
8-
"node-mongo": "bin/create-node-mongo-project"
8+
"node-mongo": "bin/create-node-mongo-project",
9+
"nmgo": "bin/create-node-mongo-project"
910
},
1011
"scripts": {
1112
"prestart": "node -r esm src/customize/startMessage.js",

src/help.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,25 @@ console.log(
66
Usage:
77
node-mongo <folder_name> <template>
88
9+
Usage (for shorter command alternative):
10+
nmgo <folder_name> <template>
11+
912
Command:
1013
node-mongo
1114
15+
Command (shorter command alternative):
16+
nmgo
17+
1218
Arguments:
1319
<folder_name> Replace this with your folder name
1420
<template> Available templates: ts, esm and cjs
1521
1622
Usage example:
1723
node-mongo test-folder ts
1824
25+
Usage example (for shorter command alternative):
26+
nmgo test-folder ts
27+
1928
The above example bootstraps the ts template i.e.
2029
the typescript template into a folder named test-folder.
2130
@@ -48,9 +57,10 @@ folder name used already exists.
4857
export const notRecognised = () => {
4958
console.log(
5059
`
51-
Flag(s) not recognised. Use the help command below for more info:
60+
Flag(s) not recognised. Use any of the help command below for more info:
5261
53-
node-mongo --help`
62+
node-mongo --help
63+
nmgo --help`
5464
);
5565
}
5666

0 commit comments

Comments
 (0)