@nx/next 16.7.2 → 16.8.0-beta.1
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/generators.json +2 -2
- package/package.json +9 -9
- package/src/generators/application/application.d.ts +1 -0
- package/src/generators/application/application.js +10 -4
- package/src/generators/application/lib/add-e2e.js +4 -2
- package/src/generators/application/lib/create-application-files.js +2 -2
- package/src/generators/application/lib/normalize-options.d.ts +1 -1
- package/src/generators/application/lib/normalize-options.js +46 -31
- package/src/generators/application/schema.d.ts +4 -2
- package/src/generators/application/schema.json +6 -1
- package/src/generators/library/lib/normalize-options.d.ts +1 -1
- package/src/generators/library/lib/normalize-options.js +15 -10
- package/src/generators/library/library.d.ts +1 -0
- package/src/generators/library/library.js +9 -3
- package/src/generators/library/schema.d.ts +3 -1
- package/src/generators/library/schema.json +6 -1
package/generators.json
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"hidden": true
|
|
41
41
|
},
|
|
42
42
|
"application": {
|
|
43
|
-
"factory": "./src/generators/application/application#
|
|
43
|
+
"factory": "./src/generators/application/application#applicationGeneratorInternal",
|
|
44
44
|
"schema": "./src/generators/application/schema.json",
|
|
45
45
|
"aliases": ["app"],
|
|
46
46
|
"x-type": "application",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"description": "Create a component."
|
|
58
58
|
},
|
|
59
59
|
"library": {
|
|
60
|
-
"factory": "./src/generators/library/library#
|
|
60
|
+
"factory": "./src/generators/library/library#libraryGeneratorInternal",
|
|
61
61
|
"schema": "./src/generators/library/schema.json",
|
|
62
62
|
"aliases": ["lib"],
|
|
63
63
|
"x-type": "library",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/next",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.8.0-beta.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.",
|
|
6
6
|
"repository": {
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@babel/plugin-proposal-decorators": "^7.22.7",
|
|
38
|
-
"@nrwl/next": "16.
|
|
39
|
-
"@nx/devkit": "16.
|
|
40
|
-
"@nx/js": "16.
|
|
41
|
-
"@nx/linter": "16.
|
|
42
|
-
"@nx/react": "16.
|
|
43
|
-
"@nx/web": "16.
|
|
44
|
-
"@nx/workspace": "16.
|
|
38
|
+
"@nrwl/next": "16.8.0-beta.1",
|
|
39
|
+
"@nx/devkit": "16.8.0-beta.1",
|
|
40
|
+
"@nx/js": "16.8.0-beta.1",
|
|
41
|
+
"@nx/linter": "16.8.0-beta.1",
|
|
42
|
+
"@nx/react": "16.8.0-beta.1",
|
|
43
|
+
"@nx/web": "16.8.0-beta.1",
|
|
44
|
+
"@nx/workspace": "16.8.0-beta.1",
|
|
45
45
|
"@svgr/webpack": "^8.0.1",
|
|
46
46
|
"chalk": "^4.1.0",
|
|
47
47
|
"copy-webpack-plugin": "^10.2.4",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
59
|
"type": "commonjs",
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "231a998e004c13e559c171ba6c164a9127886153"
|
|
61
61
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GeneratorCallback, Tree } from '@nx/devkit';
|
|
2
2
|
import { Schema } from './schema';
|
|
3
3
|
export declare function applicationGenerator(host: Tree, schema: Schema): Promise<GeneratorCallback>;
|
|
4
|
+
export declare function applicationGeneratorInternal(host: Tree, schema: Schema): Promise<GeneratorCallback>;
|
|
4
5
|
export declare const applicationSchematic: (generatorOptions: Schema) => (tree: any, context: any) => Promise<any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.applicationSchematic = exports.applicationGenerator = void 0;
|
|
3
|
+
exports.applicationSchematic = exports.applicationGeneratorInternal = exports.applicationGenerator = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
const normalize_options_1 = require("./lib/normalize-options");
|
|
@@ -17,9 +17,15 @@ const custom_server_1 = require("../custom-server/custom-server");
|
|
|
17
17
|
const update_cypress_tsconfig_1 = require("./lib/update-cypress-tsconfig");
|
|
18
18
|
const show_possible_warnings_1 = require("./lib/show-possible-warnings");
|
|
19
19
|
function applicationGenerator(host, schema) {
|
|
20
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
return yield applicationGeneratorInternal(host, Object.assign({ projectNameAndRootFormat: 'derived' }, schema));
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
exports.applicationGenerator = applicationGenerator;
|
|
25
|
+
function applicationGeneratorInternal(host, schema) {
|
|
20
26
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
21
27
|
const tasks = [];
|
|
22
|
-
const options = (0, normalize_options_1.normalizeOptions)(host, schema);
|
|
28
|
+
const options = yield (0, normalize_options_1.normalizeOptions)(host, schema);
|
|
23
29
|
(0, show_possible_warnings_1.showPossibleWarnings)(host, options);
|
|
24
30
|
const nextTask = yield (0, init_1.nextInitGenerator)(host, Object.assign(Object.assign({}, options), { skipFormat: true }));
|
|
25
31
|
tasks.push(nextTask);
|
|
@@ -41,7 +47,7 @@ function applicationGenerator(host, schema) {
|
|
|
41
47
|
(0, set_defaults_1.setDefaults)(host, options);
|
|
42
48
|
if (options.customServer) {
|
|
43
49
|
yield (0, custom_server_1.customServerGenerator)(host, {
|
|
44
|
-
project: options.
|
|
50
|
+
project: options.projectName,
|
|
45
51
|
compiler: options.swc ? 'swc' : 'tsc',
|
|
46
52
|
});
|
|
47
53
|
}
|
|
@@ -51,5 +57,5 @@ function applicationGenerator(host, schema) {
|
|
|
51
57
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
52
58
|
});
|
|
53
59
|
}
|
|
54
|
-
exports.
|
|
60
|
+
exports.applicationGeneratorInternal = applicationGeneratorInternal;
|
|
55
61
|
exports.applicationSchematic = (0, devkit_1.convertNxGenerator)(applicationGenerator);
|
|
@@ -9,7 +9,9 @@ function addE2e(host, options) {
|
|
|
9
9
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
10
10
|
if (options.e2eTestRunner === 'cypress') {
|
|
11
11
|
const { cypressProjectGenerator } = (0, devkit_1.ensurePackage)('@nx/cypress', versions_1.nxVersion);
|
|
12
|
-
return cypressProjectGenerator(host, Object.assign(Object.assign({}, options), { linter: linter_1.Linter.EsLint, name: options.e2eProjectName, directory: options.
|
|
12
|
+
return cypressProjectGenerator(host, Object.assign(Object.assign({}, options), { linter: linter_1.Linter.EsLint, name: options.e2eProjectName, directory: options.e2eProjectRoot,
|
|
13
|
+
// the name and root are already normalized, instruct the generator to use them as is
|
|
14
|
+
projectNameAndRootFormat: 'as-provided', project: options.projectName, skipFormat: true }));
|
|
13
15
|
}
|
|
14
16
|
else if (options.e2eTestRunner === 'playwright') {
|
|
15
17
|
const { configurationGenerator } = (0, devkit_1.ensurePackage)('@nx/playwright', versions_1.nxVersion);
|
|
@@ -28,7 +30,7 @@ function addE2e(host, options) {
|
|
|
28
30
|
linter: options.linter,
|
|
29
31
|
setParserOptionsProject: options.setParserOptionsProject,
|
|
30
32
|
webServerAddress: 'http://127.0.0.1:4200',
|
|
31
|
-
webServerCommand: `${(0, devkit_1.getPackageManagerCommand)().exec} nx serve ${options.
|
|
33
|
+
webServerCommand: `${(0, devkit_1.getPackageManagerCommand)().exec} nx serve ${options.projectName}`,
|
|
32
34
|
});
|
|
33
35
|
}
|
|
34
36
|
return () => { };
|
|
@@ -12,7 +12,7 @@ function createApplicationFiles(host, options) {
|
|
|
12
12
|
const layoutTypeDistPath = (0, devkit_1.joinPathFragments)(offsetFromRoot, options.outputPath, '.next/types/**/*.ts');
|
|
13
13
|
const templateVariables = Object.assign(Object.assign(Object.assign({}, (0, devkit_1.names)(options.name)), options), { dot: '.', tmpl: '', offsetFromRoot,
|
|
14
14
|
layoutTypeSrcPath,
|
|
15
|
-
layoutTypeDistPath, rootTsConfigPath: (0, js_1.getRelativePathToRootTsConfig)(host, options.appProjectRoot), appContent: (0, create_application_files_helpers_1.createAppJsx)(options.
|
|
15
|
+
layoutTypeDistPath, rootTsConfigPath: (0, js_1.getRelativePathToRootTsConfig)(host, options.appProjectRoot), appContent: (0, create_application_files_helpers_1.createAppJsx)(options.projectName), styleContent: (0, create_application_files_helpers_1.createStyleRules)(), pageStyleContent: `.page {}`, stylesExt: options.style === 'less' || options.style === 'styl'
|
|
16
16
|
? options.style
|
|
17
17
|
: 'css' });
|
|
18
18
|
(0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, '../files/common'), options.appProjectRoot, templateVariables);
|
|
@@ -50,7 +50,7 @@ function createApplicationFiles(host, options) {
|
|
|
50
50
|
...(updatedJson.exclude || []),
|
|
51
51
|
...(appJSON.exclude || []),
|
|
52
52
|
'**e2e/**/*',
|
|
53
|
-
`dist/${options.
|
|
53
|
+
`dist/${options.projectName}/**/*`,
|
|
54
54
|
]),
|
|
55
55
|
] });
|
|
56
56
|
return updatedJson;
|
|
@@ -11,4 +11,4 @@ export interface NormalizedSchema extends Schema {
|
|
|
11
11
|
styledModule: null | string;
|
|
12
12
|
js?: boolean;
|
|
13
13
|
}
|
|
14
|
-
export declare function normalizeOptions(host: Tree, options: Schema): NormalizedSchema
|
|
14
|
+
export declare function normalizeOptions(host: Tree, options: Schema): Promise<NormalizedSchema>;
|
|
@@ -1,40 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizeOptions = void 0;
|
|
4
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
|
6
7
|
const linter_1 = require("@nx/linter");
|
|
8
|
+
const assertion_1 = require("@nx/react/src/utils/assertion");
|
|
7
9
|
function normalizeOptions(host, options) {
|
|
8
10
|
var _a;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
11
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
12
|
+
const { projectName: appProjectName, projectRoot: appProjectRoot, projectNameAndRootFormat, } = yield (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
|
|
13
|
+
name: options.name,
|
|
14
|
+
projectType: 'application',
|
|
15
|
+
directory: options.directory,
|
|
16
|
+
projectNameAndRootFormat: options.projectNameAndRootFormat,
|
|
17
|
+
rootProject: options.rootProject,
|
|
18
|
+
callingGenerator: '@nx/next:application',
|
|
19
|
+
});
|
|
20
|
+
options.rootProject = appProjectRoot === '.';
|
|
21
|
+
options.projectNameAndRootFormat = projectNameAndRootFormat;
|
|
22
|
+
let e2eProjectName = 'e2e';
|
|
23
|
+
let e2eProjectRoot = 'e2e';
|
|
24
|
+
if (!options.rootProject) {
|
|
25
|
+
const projectNameAndRoot = yield (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
|
|
26
|
+
name: `${options.name}-e2e`,
|
|
27
|
+
projectType: 'application',
|
|
28
|
+
directory: options.directory,
|
|
29
|
+
projectNameAndRootFormat: options.projectNameAndRootFormat,
|
|
30
|
+
rootProject: options.rootProject,
|
|
31
|
+
callingGenerator: '@nx/next:application',
|
|
32
|
+
});
|
|
33
|
+
e2eProjectName = projectNameAndRoot.projectName;
|
|
34
|
+
e2eProjectRoot = projectNameAndRoot.projectRoot;
|
|
35
|
+
}
|
|
36
|
+
const name = (0, devkit_1.names)(options.name).fileName;
|
|
37
|
+
const outputPath = (0, devkit_1.joinPathFragments)('dist', appProjectRoot, ...(options.rootProject ? [name] : []));
|
|
38
|
+
const parsedTags = options.tags
|
|
39
|
+
? options.tags.split(',').map((s) => s.trim())
|
|
40
|
+
: [];
|
|
41
|
+
const fileName = 'index';
|
|
42
|
+
const appDir = (_a = options.appDir) !== null && _a !== void 0 ? _a : true;
|
|
43
|
+
const styledModule = /^(css|scss|less|styl)$/.test(options.style)
|
|
44
|
+
? null
|
|
45
|
+
: options.style;
|
|
46
|
+
(0, assertion_1.assertValidStyle)(options.style);
|
|
47
|
+
return Object.assign(Object.assign({}, options), { appDir,
|
|
48
|
+
appProjectRoot,
|
|
49
|
+
e2eProjectName,
|
|
50
|
+
e2eProjectRoot, e2eTestRunner: options.e2eTestRunner || 'cypress', fileName, linter: options.linter || linter_1.Linter.EsLint, name,
|
|
51
|
+
outputPath,
|
|
52
|
+
parsedTags, projectName: appProjectName, style: options.style || 'css', styledModule, unitTestRunner: options.unitTestRunner || 'jest' });
|
|
53
|
+
});
|
|
39
54
|
}
|
|
40
55
|
exports.normalizeOptions = normalizeOptions;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
|
|
2
|
+
import type { Linter } from '@nx/linter';
|
|
3
|
+
import type { SupportedStyles } from '@nx/react';
|
|
3
4
|
|
|
4
5
|
export interface Schema {
|
|
5
6
|
name: string;
|
|
6
7
|
style?: SupportedStyles;
|
|
7
8
|
skipFormat?: boolean;
|
|
8
9
|
directory?: string;
|
|
10
|
+
projectNameAndRootFormat?: ProjectNameAndRootFormat;
|
|
9
11
|
tags?: string;
|
|
10
12
|
unitTestRunner?: 'jest' | 'none';
|
|
11
13
|
e2eTestRunner?: 'cypress' | 'playwright' | 'none';
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"index": 0
|
|
15
15
|
},
|
|
16
16
|
"x-prompt": "What name would you like to use for the application?",
|
|
17
|
-
"pattern": "^[a-zA-Z]
|
|
17
|
+
"pattern": "^[a-zA-Z][^:]*$",
|
|
18
18
|
"x-priority": "important"
|
|
19
19
|
},
|
|
20
20
|
"directory": {
|
|
@@ -23,6 +23,11 @@
|
|
|
23
23
|
"alias": "d",
|
|
24
24
|
"x-priority": "important"
|
|
25
25
|
},
|
|
26
|
+
"projectNameAndRootFormat": {
|
|
27
|
+
"description": "Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).",
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": ["as-provided", "derived"]
|
|
30
|
+
},
|
|
26
31
|
"style": {
|
|
27
32
|
"description": "The file extension to be used for style files.",
|
|
28
33
|
"type": "string",
|
|
@@ -4,4 +4,4 @@ export interface NormalizedSchema extends Schema {
|
|
|
4
4
|
importPath: string;
|
|
5
5
|
projectRoot: string;
|
|
6
6
|
}
|
|
7
|
-
export declare function normalizeOptions(host: Tree, options: Schema): NormalizedSchema
|
|
7
|
+
export declare function normalizeOptions(host: Tree, options: Schema): Promise<NormalizedSchema>;
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizeOptions = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
|
6
6
|
function normalizeOptions(host, options) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
|
+
const { projectRoot, importPath, projectNameAndRootFormat } = yield (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
|
|
9
|
+
name: options.name,
|
|
10
|
+
projectType: 'library',
|
|
11
|
+
directory: options.directory,
|
|
12
|
+
importPath: options.importPath,
|
|
13
|
+
projectNameAndRootFormat: options.projectNameAndRootFormat,
|
|
14
|
+
callingGenerator: '@nx/next:library',
|
|
15
|
+
});
|
|
16
|
+
options.projectNameAndRootFormat = projectNameAndRootFormat;
|
|
17
|
+
return Object.assign(Object.assign({}, options), { importPath,
|
|
18
|
+
projectRoot });
|
|
19
|
+
});
|
|
15
20
|
}
|
|
16
21
|
exports.normalizeOptions = normalizeOptions;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GeneratorCallback, Tree } from '@nx/devkit';
|
|
2
2
|
import { Schema } from './schema';
|
|
3
3
|
export declare function libraryGenerator(host: Tree, rawOptions: Schema): Promise<GeneratorCallback>;
|
|
4
|
+
export declare function libraryGeneratorInternal(host: Tree, rawOptions: Schema): Promise<GeneratorCallback>;
|
|
4
5
|
export default libraryGenerator;
|
|
5
6
|
export declare const librarySchematic: (generatorOptions: Schema) => (tree: any, context: any) => Promise<any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.librarySchematic = exports.libraryGenerator = void 0;
|
|
3
|
+
exports.librarySchematic = exports.libraryGeneratorInternal = exports.libraryGenerator = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
const library_1 = require("@nx/react/src/generators/library/library");
|
|
@@ -9,7 +9,13 @@ const init_1 = require("../init/init");
|
|
|
9
9
|
const normalize_options_1 = require("./lib/normalize-options");
|
|
10
10
|
function libraryGenerator(host, rawOptions) {
|
|
11
11
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
12
|
-
|
|
12
|
+
return yield libraryGeneratorInternal(host, Object.assign({ projectNameAndRootFormat: 'derived' }, rawOptions));
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
exports.libraryGenerator = libraryGenerator;
|
|
16
|
+
function libraryGeneratorInternal(host, rawOptions) {
|
|
17
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
const options = yield (0, normalize_options_1.normalizeOptions)(host, rawOptions);
|
|
13
19
|
const tasks = [];
|
|
14
20
|
const initTask = yield (0, init_1.nextInitGenerator)(host, Object.assign(Object.assign({}, options), { skipFormat: true }));
|
|
15
21
|
tasks.push(initTask);
|
|
@@ -58,6 +64,6 @@ function libraryGenerator(host, rawOptions) {
|
|
|
58
64
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
59
65
|
});
|
|
60
66
|
}
|
|
61
|
-
exports.
|
|
67
|
+
exports.libraryGeneratorInternal = libraryGeneratorInternal;
|
|
62
68
|
exports.default = libraryGenerator;
|
|
63
69
|
exports.librarySchematic = (0, devkit_1.convertNxGenerator)(libraryGenerator);
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-directory-utils';
|
|
2
|
+
import type { Linter } from '@nx/linter';
|
|
2
3
|
import type { SupportedStyles } from '@nx/react';
|
|
3
4
|
|
|
4
5
|
export interface Schema {
|
|
5
6
|
name: string;
|
|
6
7
|
directory?: string;
|
|
8
|
+
projectNameAndRootFormat?: ProjectNameAndRootFormat;
|
|
7
9
|
style: SupportedStyles;
|
|
8
10
|
skipTsConfig?: boolean;
|
|
9
11
|
skipFormat?: boolean;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"index": 0
|
|
15
15
|
},
|
|
16
16
|
"x-prompt": "What name would you like to use for the library?",
|
|
17
|
-
"pattern": "
|
|
17
|
+
"pattern": "(?:^@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*\\/[a-zA-Z0-9-~][a-zA-Z0-9-._~]*|^[a-zA-Z][^:]*)$",
|
|
18
18
|
"x-priority": "important"
|
|
19
19
|
},
|
|
20
20
|
"directory": {
|
|
@@ -23,6 +23,11 @@
|
|
|
23
23
|
"alias": "dir",
|
|
24
24
|
"x-priority": "important"
|
|
25
25
|
},
|
|
26
|
+
"projectNameAndRootFormat": {
|
|
27
|
+
"description": "Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).",
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": ["as-provided", "derived"]
|
|
30
|
+
},
|
|
26
31
|
"style": {
|
|
27
32
|
"description": "The file extension to be used for style files.",
|
|
28
33
|
"type": "string",
|