This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class Hello { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class <%= classify(name) %> { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/schema", | |
"id": "simpleSchema", | |
"title": "Creates a simple schematic.", | |
"type": "object", | |
"properties": { | |
"project": { | |
"type": "string", | |
"description": "The name of the project.", | |
"$default": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json", | |
"schematics": { | |
"simple-schematic": { | |
"description": "A basic schematic.", | |
"factory": "./simple-schematic/index#simpleSchematic", | |
"schema": "./simple-schematic/schema.json" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
options.skipVo ? noop() : schematic("vo", voOptions), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// DON'T DO THIS | |
options.skipVo ? noop() : schematic("vo", { | |
project: options.project, | |
path: options.path, | |
name: options.vo, | |
spec: options.spec, | |
obj: options.obj | |
}), | |
// DO THIS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// within template chain | |
..., | |
options.uiFramework === UI_FRAMEWORK_OPTION.MATERIAL ? | |
externalSchematic('@angular/material', 'material-shell', { | |
project: options.project | |
}) : noop(), | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/schema", | |
"id": "SchematicsMaterialInstall", | |
"title": "Material Install Options Schema", | |
"type": "object", | |
"properties": { | |
"skipPackageJson": { | |
"type": "boolean", | |
"default": false, | |
"description": "Do not add materials dependencies to package.json (e.g., --skipPackageJson)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "./node_modules/@angular-devkit/schematics/collection-schema.json", | |
"schematics": { | |
// Adds Angular Material to an application without changing any templates | |
"ng-add": { | |
"description": "Adds Angular Material to the application without affecting any templates", | |
"factory": "./install", | |
"schema": "./install/schema.json", | |
"aliases": ["material-shell"] # <-- name/alias of Schematic | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rule = chain([ | |
rule1, | |
rule2, | |
rule3 | |
]); | |
return rule(host, context); |