Skip to content

Commit 8ca342f

Browse files
author
Angular Builds
committed
322f6ec refactor(@schematics/angular): use generateFromFiles helper in more cases
1 parent a0be17f commit 8ca342f

14 files changed

+12
-22
lines changed

class/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
1010
exports.default = default_1;
1111
const generate_from_files_1 = require("../utility/generate-from-files");
1212
function default_1(options) {
13-
options.type = options.type ? `.${options.type}` : '';
1413
return (0, generate_from_files_1.generateFromFiles)(options);
1514
}

directive/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ function default_1(options) {
3636
options.path = (0, workspace_1.buildDefaultPath)(project);
3737
}
3838
options.module = (0, find_module_1.findModuleFromOptions)(host, options);
39-
// Schematic templates require a defined type value
40-
options.type ??= '';
4139
const parsedPath = (0, parse_name_1.parseName)(options.path, options.name);
4240
options.name = parsedPath.name;
4341
options.path = parsedPath.path;

interface/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
1010
exports.default = default_1;
1111
const generate_from_files_1 = require("../utility/generate-from-files");
1212
function default_1(options) {
13-
options.type = options.type ? `.${options.type}` : '';
1413
return (0, generate_from_files_1.generateFromFiles)(options);
1514
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@schematics/angular",
3-
"version": "20.0.0-next.4+sha-bfdd8d5",
3+
"version": "20.0.0-next.4+sha-322f6ec",
44
"description": "Schematics specific to Angular",
55
"homepage": "https://github.com/angular/angular-cli",
66
"keywords": [
@@ -22,8 +22,8 @@
2222
},
2323
"schematics": "./collection.json",
2424
"dependencies": {
25-
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#bfdd8d5",
26-
"@angular-devkit/schematics": "github:angular/angular-devkit-schematics-builds#bfdd8d5",
25+
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#322f6ec",
26+
"@angular-devkit/schematics": "github:angular/angular-devkit-schematics-builds#322f6ec",
2727
"jsonc-parser": "3.3.1"
2828
},
2929
"repository": {

service/index.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
1010
exports.default = default_1;
1111
const generate_from_files_1 = require("../utility/generate-from-files");
1212
function default_1(options) {
13-
// This schematic uses an older method to implement the flat option
14-
const flat = options.flat;
15-
options.flat = true;
16-
// Schematic templates require a defined type value
17-
options.type ??= '';
18-
return (0, generate_from_files_1.generateFromFiles)(options, {
19-
'if-flat': (s) => (flat ? '' : s),
20-
});
13+
return (0, generate_from_files_1.generateFromFiles)(options);
2114
}

0 commit comments

Comments
 (0)