mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
feat(ng-add): add x-prompts to install schematics (#13058)
* Recently the Angular CLI project introduced prompt support for schematics. Even though they seem to not run when using `7.0.0-beta.2` of the CLI, we should already ship the simple prompts for the `ng add` command. * Renames the `/schematics/install` folder to `/schematics/ng-add`. (this makes it consistent with the actual schematic name and other packages that ship the `ng-add` schematic (e.g. `@angular/elements`)
This commit is contained in:
committed by
Jeremy Elbourn
parent
90af397d9b
commit
a5bc79c706
@@ -5,8 +5,8 @@
|
||||
// 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",
|
||||
"factory": "./ng-add/index",
|
||||
"schema": "./ng-add/schema.json",
|
||||
"aliases": ["material-shell", "install"]
|
||||
},
|
||||
// Create a dashboard component
|
||||
|
||||
@@ -9,7 +9,7 @@ import {collectionPath, createTestApp} from '../test-setup/test-app';
|
||||
import {getWorkspace, WorkspaceProject} from '@schematics/angular/utility/config';
|
||||
import {normalize} from '@angular-devkit/core';
|
||||
|
||||
describe('material-install-schematic', () => {
|
||||
describe('ng-add schematic', () => {
|
||||
let runner: SchematicTestRunner;
|
||||
let appTree: Tree;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/schema",
|
||||
"id": "SchematicsMaterialInstall",
|
||||
"title": "Material Install Options Schema",
|
||||
"id": "angular-material-ng-add",
|
||||
"title": "Angular Material ng-add schematic",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"project": {
|
||||
@@ -19,12 +19,14 @@
|
||||
"theme": {
|
||||
"enum": ["indigo-pink", "deeppurple-amber", "pink-bluegrey", "purple-green", "custom"],
|
||||
"default": "indigo-pink",
|
||||
"description": "The theme to apply"
|
||||
"description": "The theme to apply",
|
||||
"x-prompt": "Enter a prebuilt theme name, or \"custom\" for a custom theme:"
|
||||
},
|
||||
"gestures": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Whether gesture support should be set up or not."
|
||||
"description": "Whether gesture support should be set up or not.",
|
||||
"x-prompt": "Set up HammerJS for gesture recognition?"
|
||||
}
|
||||
},
|
||||
"required": []
|
||||
Reference in New Issue
Block a user