Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/schematics/angular/app-shell/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"format": "path",
"description": "The path of the source directory.",
"default": "src",
"alias": "sd"
"alias": "D"
}
},
"required": [
Expand Down
6 changes: 6 additions & 0 deletions packages/schematics/angular/application/index_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,10 @@ describe('Application Schematic', () => {
const content = tree.readContent(path);
expect(content).toMatch(/import { AppComponent } from \'\.\/app\.component\';/);
});

it('should use the directory option', () => {
const options = { ...defaultOptions, directory: 'my-dir' };
const tree = schematicRunner.runSchematic('application', options);
expect(tree.exists('/my-dir/package.json')).toEqual(true);
});
});
13 changes: 6 additions & 7 deletions packages/schematics/angular/application/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"directory": {
"type": "string",
"format": "path",
"description": "The directory name to create the app in.",
"alias": "dir"
"description": "The directory name to create the app in."
},
"path": {
"type": "string",
Expand All @@ -22,7 +21,7 @@
"format": "path",
"description": "The path of the source directory.",
"default": "src",
"alias": "sd",
"alias": "D",
"visible": false
},
"name": {
Expand All @@ -34,13 +33,13 @@
"description": "Specifies if the style will be in the ts file.",
"type": "boolean",
"default": false,
"alias": "is"
"alias": "s"
},
"inlineTemplate": {
"description": "Specifies if the template will be in the ts file.",
"type": "boolean",
"default": false,
"alias": "it"
"alias": "t"
},
"viewEncapsulation": {
"description": "Specifies the view encapsulation strategy.",
Expand Down Expand Up @@ -73,7 +72,7 @@
"description": "Skip creating spec files.",
"type": "boolean",
"default": false,
"alias": "st"
"alias": "S"
},
"skipInstall": {
"description": "Skip installing dependency packages.",
Expand All @@ -90,7 +89,7 @@
"description": "Skip initializing a git repository.",
"type": "boolean",
"default": false,
"alias": "sg"
"alias": "g"
},
"commit": {
"description": "Initial repository commit information.",
Expand Down
10 changes: 5 additions & 5 deletions packages/schematics/angular/component/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"format": "path",
"description": "The path of the source directory.",
"default": "src",
"alias": "sd",
"alias": "D",
"visible": false
},
"appRoot": {
Expand All @@ -33,26 +33,26 @@
"description": "Specifies if the style will be in the ts file.",
"type": "boolean",
"default": false,
"alias": "is"
"alias": "s"
},
"inlineTemplate": {
"description": "Specifies if the template will be in the ts file.",
"type": "boolean",
"default": false,
"alias": "it"
"alias": "t"
},
"viewEncapsulation": {
"description": "Specifies the view encapsulation strategy.",
"enum": ["Emulated", "Native", "None"],
"type": "string",
"alias": "ve"
"alias": "v"
},
"changeDetection": {
"description": "Specifies the change detection strategy.",
"enum": ["Default", "OnPush"],
"type": "string",
"default": "Default",
"alias": "cd"
"alias": "c"
},
"prefix": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion packages/schematics/angular/universal/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"format": "path",
"description": "The path of the source directory.",
"default": "src",
"alias": "sd"
"alias": "D"
}
},
"required": [
Expand Down