Skip to content

Commit

Permalink
feat(react): add aliases for common React commands (#1732)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoo authored Aug 16, 2019
1 parent fa7c9a7 commit f4d8354
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 7 deletions.
10 changes: 10 additions & 0 deletions docs/api-react/schematics/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Use Babel and TypeScript preset instead of ts-loader (Useful if you need Babel p

### classComponent

Alias(es): C

Default: `false`

Type: `boolean`
Expand All @@ -29,6 +31,8 @@ Use class components instead of functional component

### directory

Alias(es): d

Type: `string`

The directory of the new application.
Expand Down Expand Up @@ -57,6 +61,8 @@ The name of the application.

### pascalCaseFiles

Alias(es): P

Default: `false`

Type: `boolean`
Expand Down Expand Up @@ -87,6 +93,8 @@ Skip updating workspace.json with default schematic options based on values prov

### style

Alias(es): s

Default: `css`

Type: `string`
Expand All @@ -95,6 +103,8 @@ The file extension to be used for style files.

### tags

Alias(es): t

Type: `string`

Add tags to the application (used for linting)
Expand Down
12 changes: 11 additions & 1 deletion docs/api-react/schematics/library.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ ng generate library ...

### appProject

Alias(es): a

Type: `string`

The application project to add the library route to

### directory

Alias(es): d

Type: `string`

A directory where the app is placed
Expand All @@ -39,11 +43,13 @@ Library name

### pascalCaseFiles

Alias(es): P

Default: `false`

Type: `boolean`

Use pascal case component file name (e.g. App.tsx)®
Use pascal case component file name (e.g. App.tsx)

### routing

Expand All @@ -69,6 +75,8 @@ Do not update tsconfig.json for development experience.

### style

Alias(es): s

Default: `css`

Type: `string`
Expand All @@ -77,6 +85,8 @@ The file extension to be used for style files.

### tags

Alias(es): t

Type: `string`

Add tags to the library (used for linting)
Expand Down
9 changes: 7 additions & 2 deletions packages/react/src/schematics/application/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
},
"directory": {
"description": "The directory of the new application.",
"type": "string"
"type": "string",
"alias": "d"
},
"style": {
"description": "The file extension to be used for style files.",
"type": "string",
"default": "css",
"alias": "s",
"x-prompt": {
"message": "Which stylesheet format would you like to use?",
"type": "list",
Expand Down Expand Up @@ -84,16 +86,19 @@
},
"tags": {
"type": "string",
"description": "Add tags to the application (used for linting)"
"description": "Add tags to the application (used for linting)",
"alias": "t"
},
"pascalCaseFiles": {
"type": "boolean",
"description": "Use pascal case component file name (e.g. App.tsx)",
"alias": "P",
"default": false
},
"classComponent": {
"type": "boolean",
"description": "Use class components instead of functional component",
"alias": "C",
"default": false
},
"babel": {
Expand Down
13 changes: 9 additions & 4 deletions packages/react/src/schematics/library/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
},
"directory": {
"type": "string",
"description": "A directory where the app is placed"
"description": "A directory where the app is placed",
"alias": "d"
},
"style": {
"description": "The file extension to be used for style files.",
"type": "string",
"default": "css",
"alias": "s",
"x-prompt": {
"message": "Which stylesheet format would you like to use?",
"type": "list",
Expand Down Expand Up @@ -63,7 +65,8 @@
},
"tags": {
"type": "string",
"description": "Add tags to the library (used for linting)"
"description": "Add tags to the library (used for linting)",
"alias": "t"
},
"skipFormat": {
"description": "Skip formatting files",
Expand All @@ -77,7 +80,8 @@
},
"pascalCaseFiles": {
"type": "boolean",
"description": "Use pascal case component file name (e.g. App.tsx)®",
"description": "Use pascal case component file name (e.g. App.tsx)",
"alias": "P",
"default": false
},
"routing": {
Expand All @@ -86,7 +90,8 @@
},
"appProject": {
"type": "string",
"description": "The application project to add the library route to"
"description": "The application project to add the library route to",
"alias": "a"
}
},
"required": ["name"]
Expand Down

0 comments on commit f4d8354

Please sign in to comment.