create-nx-plugin 16.4.0-beta.9 → 16.4.0
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/bin/create-nx-plugin.js +17 -0
- package/package.json +3 -3
package/bin/create-nx-plugin.js
CHANGED
|
@@ -42,6 +42,21 @@ function determinePluginName(parsedArgs) {
|
|
|
42
42
|
return results.pluginName;
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
+
function determineCreatePackageName(parsedArgs) {
|
|
46
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
if (parsedArgs.createPackageName) {
|
|
48
|
+
return parsedArgs.createPackageName;
|
|
49
|
+
}
|
|
50
|
+
const results = yield enquirer.prompt([
|
|
51
|
+
{
|
|
52
|
+
name: 'createPackageName',
|
|
53
|
+
message: `Create a package which can be used by npx to create a new workspace (Leave blank to not create this package)`,
|
|
54
|
+
type: 'input',
|
|
55
|
+
},
|
|
56
|
+
]);
|
|
57
|
+
return results.createPackageName;
|
|
58
|
+
});
|
|
59
|
+
}
|
|
45
60
|
exports.commandsObject = yargs
|
|
46
61
|
.wrap(yargs.terminalWidth())
|
|
47
62
|
.parserConfiguration({
|
|
@@ -106,12 +121,14 @@ function normalizeArgsMiddleware(argv) {
|
|
|
106
121
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
107
122
|
try {
|
|
108
123
|
const pluginName = yield determinePluginName(argv);
|
|
124
|
+
const createPackageName = yield determineCreatePackageName(argv);
|
|
109
125
|
const packageManager = yield (0, prompts_1.determinePackageManager)(argv);
|
|
110
126
|
const defaultBase = yield (0, prompts_1.determineDefaultBase)(argv);
|
|
111
127
|
const nxCloud = yield (0, prompts_1.determineNxCloud)(argv);
|
|
112
128
|
const ci = yield (0, prompts_1.determineCI)(argv, nxCloud);
|
|
113
129
|
Object.assign(argv, {
|
|
114
130
|
pluginName,
|
|
131
|
+
createPackageName,
|
|
115
132
|
nxCloud,
|
|
116
133
|
packageManager,
|
|
117
134
|
defaultBase,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-nx-plugin",
|
|
3
|
-
"version": "16.4.0
|
|
3
|
+
"version": "16.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "This package is used to scaffold a brand-new workspace used to develop an Nx plugin, and sets up a pre-configured plugin with the specified name. The new plugin is created with a default generator, executor, and e2e app.",
|
|
6
6
|
"repository": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"homepage": "https://nx.dev",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"chalk": "^4.1.0",
|
|
33
|
-
"create-nx-workspace": "16.4.0
|
|
33
|
+
"create-nx-workspace": "16.4.0",
|
|
34
34
|
"enquirer": "~2.3.6",
|
|
35
35
|
"yargs": "^17.6.2"
|
|
36
36
|
},
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
},
|
|
40
40
|
"main": "./bin/create-nx-plugin.js",
|
|
41
41
|
"types": "./bin/create-nx-plugin.d.ts",
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "ae698a72748d9f33aa5395aeeaa7b7af436a1dc5"
|
|
43
43
|
}
|