create-nx-plugin 23.2.0-beta.6 → 23.2.0-beta.7
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import yargs = require('yargs');
|
|
3
3
|
import { CreateWorkspaceOptions } from 'create-nx-workspace';
|
|
4
|
-
import type { NxCloud, PackageManager } from 'create-nx-workspace/internal';
|
|
4
|
+
import type { Linter, NxCloud, PackageManager } from 'create-nx-workspace/internal';
|
|
5
5
|
export declare const yargsDecorator: {
|
|
6
6
|
'Options:': string;
|
|
7
7
|
'Examples:': string;
|
|
@@ -20,6 +20,7 @@ interface CreateNxPluginArguments extends CreateWorkspaceOptions {
|
|
|
20
20
|
packageManager: PackageManager;
|
|
21
21
|
allPrompts: boolean;
|
|
22
22
|
nxCloud: NxCloud;
|
|
23
|
+
linter?: Linter;
|
|
23
24
|
}
|
|
24
25
|
export declare const commandsObject: yargs.Argv<CreateNxPluginArguments>;
|
|
25
26
|
export {};
|
|
@@ -66,6 +66,19 @@ exports.commandsObject = yargs
|
|
|
66
66
|
.option('createPackageName', {
|
|
67
67
|
describe: 'Name of the CLI package to create workspace with plugin',
|
|
68
68
|
type: 'string',
|
|
69
|
+
})
|
|
70
|
+
// `choices` is load-bearing, not documentation: it rejects a typo at
|
|
71
|
+
// argv parse. The preset's own enum would catch it too, but only after
|
|
72
|
+
// the workspace has been created and installed.
|
|
73
|
+
.option('linter', {
|
|
74
|
+
describe: pc.dim(`Linter to use`),
|
|
75
|
+
choices: [...internal_1.LINTERS],
|
|
76
|
+
type: 'string',
|
|
77
|
+
})
|
|
78
|
+
.option('interactive', {
|
|
79
|
+
describe: pc.dim(`Enable interactive mode`),
|
|
80
|
+
type: 'boolean',
|
|
81
|
+
default: true,
|
|
69
82
|
}), internal_1.withNxCloud, internal_1.withAllPrompts, internal_1.withPackageManager, internal_1.withGitOptions), async (argv) => {
|
|
70
83
|
await main(argv).catch((error) => {
|
|
71
84
|
const { version } = require((0, path_1.join)('create-nx-plugin', 'package.json'));
|
|
@@ -134,12 +147,14 @@ async function normalizeArgsMiddleware(argv) {
|
|
|
134
147
|
const packageManager = await (0, internal_1.determinePackageManager)(argv);
|
|
135
148
|
const defaultBase = await (0, internal_1.determineDefaultBase)(argv);
|
|
136
149
|
const nxCloud = await (0, internal_1.determineNxCloud)(argv);
|
|
150
|
+
const linter = await (0, internal_1.determineLinterOptions)(argv);
|
|
137
151
|
Object.assign(argv, {
|
|
138
152
|
pluginName,
|
|
139
153
|
createPackageName,
|
|
140
154
|
nxCloud,
|
|
141
155
|
packageManager,
|
|
142
156
|
defaultBase,
|
|
157
|
+
linter,
|
|
143
158
|
});
|
|
144
159
|
}
|
|
145
160
|
catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-nx-plugin",
|
|
3
|
-
"version": "23.2.0-beta.
|
|
3
|
+
"version": "23.2.0-beta.7",
|
|
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": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"enquirer": "~2.3.6",
|
|
41
41
|
"tslib": "^2.3.0",
|
|
42
42
|
"yargs": "^17.6.2",
|
|
43
|
-
"create-nx-workspace": "23.2.0-beta.
|
|
43
|
+
"create-nx-workspace": "23.2.0-beta.7"
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|