Skip to content

Commit

Permalink
fix(schematics): fix repeat alias name (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk authored Oct 31, 2018
1 parent 7ef0c85 commit 4f744fa
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 21 deletions.
3 changes: 1 addition & 2 deletions packages/schematics/curd/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"inlineTemplate": {
"description": "Specifies if the template will be in the ts file.",
"type": "boolean",
"default": false,
"alias": "t"
"default": false
},
"viewEncapsulation": {
"description": "Specifies the view encapsulation strategy.",
Expand Down
2 changes: 1 addition & 1 deletion packages/schematics/docs/add.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type: Documents
## Overview

```bash
ng add ng-alain@next <project name>
ng add ng-alain@next [project name]
```

## Options
Expand Down
2 changes: 1 addition & 1 deletion packages/schematics/docs/add.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type: Documents
## 命令格式

```bash
ng add ng-alain@next <project name>
ng add ng-alain@next [project name]
```

## 额外参数
Expand Down
4 changes: 2 additions & 2 deletions packages/schematics/docs/generate.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ng-alain adds cool operations based on this.
## Command format

```bash
ng g ng-alain:<command name> <name> [options]
ng g ng-alain:[command name] [name] [options]
```

> ng-alain has own file structure specification, which can cause exceptions when you break this file structure.
Expand Down Expand Up @@ -74,7 +74,7 @@ ng g ng-alain:view view -m=sys -t=log
For `edit`, `view`, the default is modal render, you can use the page render:

```bash
ng g ng-alain:edit <page name> --modal=false
ng g ng-alain:edit [page name] --modal=false
```

> If you receive `No provider for NzModalRef!` error, because of modal component must be opened with `nzModalService`, and does not need to register into route.
Expand Down
4 changes: 2 additions & 2 deletions packages/schematics/docs/generate.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ng-alain 在此基础上增加了很多很酷的骚操作。
## 命令格式

```bash
ng g ng-alain:<command name> <name> [options]
ng g ng-alain:[command name] [name] [options]
```

> ng-alain 有自己的一套文件组织结构,当你破坏这些结构时,可能会导致下列指令产生异常。
Expand Down Expand Up @@ -73,7 +73,7 @@ ng g ng-alain:view view -m=sys -t=log
对于 `edit``view` 默认是以模态框展示来生成,你可以改用页面展示则:

```bash
ng g ng-alain:edit <page name> --modal=false
ng g ng-alain:edit [page name] --modal=false
```

> 如果你不小心将收到【No provider for NzModalRef! 】表明你把一个需要使用 `nzModalService` 打开的模态框组件,用了路由注册的方式。打开模态框组件无须注册路由,但需要注册至 `entryComponents`
Expand Down
4 changes: 2 additions & 2 deletions packages/schematics/docs/plugin.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ ng g ng-alain:plugin codeStyle
## Command format

```bash
ng g ng-alain:plugin <plugin name> -t=[add | remove]
ng g ng-alain:plugin [plugin name] -t=[add | remove]
```

The `<plugin name>` is plugin name, `-t` supports two values `add` (default) and `remove`.
The `[plugin name]` is plugin name, `-t` supports two values `add` (default) and `remove`.

## List of plugins

Expand Down
4 changes: 2 additions & 2 deletions packages/schematics/docs/plugin.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ ng g ng-alain:plugin codeStyle
## 命令格式

```bash
ng g ng-alain:plugin <plugin name> -t=[add | remove]
ng g ng-alain:plugin [plugin name] -t=[add | remove]
```

其中 `<plugin name>` 插件名称,从插件列表中获取,`-t` 支持两种值 `add`(默认) 和 `remove`
其中 `[plugin name]` 插件名称,从插件列表中获取,`-t` 支持两种值 `add`(默认) 和 `remove`

## 插件列表

Expand Down
3 changes: 1 addition & 2 deletions packages/schematics/edit/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"inlineTemplate": {
"description": "Specifies if the template will be in the ts file.",
"type": "boolean",
"default": false,
"alias": "t"
"default": false
},
"viewEncapsulation": {
"description": "Specifies the view encapsulation strategy.",
Expand Down
3 changes: 1 addition & 2 deletions packages/schematics/empty/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"inlineTemplate": {
"description": "Specifies if the template will be in the ts file.",
"type": "boolean",
"default": false,
"alias": "t"
"default": false
},
"viewEncapsulation": {
"description": "Specifies the view encapsulation strategy.",
Expand Down
3 changes: 1 addition & 2 deletions packages/schematics/list/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"inlineTemplate": {
"description": "Specifies if the template will be in the ts file.",
"type": "boolean",
"default": false,
"alias": "t"
"default": false
},
"viewEncapsulation": {
"description": "Specifies the view encapsulation strategy.",
Expand Down
3 changes: 1 addition & 2 deletions packages/schematics/view/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"inlineTemplate": {
"description": "Specifies if the template will be in the ts file.",
"type": "boolean",
"default": false,
"alias": "t"
"default": false
},
"viewEncapsulation": {
"description": "Specifies the view encapsulation strategy.",
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/build-schematics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ echo "Finished cli!"
if [[ ${DEBUG} == true ]]; then
cd ../../
DEBUG_FROM=${PWD}/work/delon/dist/ng-alain/*
DEBUG_TO=${PWD}/work/demo/node_modules/ng-alain/
DEBUG_TO=${PWD}/work/ng-alain/node_modules/ng-alain/
echo "DEBUG_FROM:${DEBUG_FROM}"
echo "DEBUG_TO:${DEBUG_TO}"
rm -rf ${DEBUG_TO}/application
Expand Down

0 comments on commit 4f744fa

Please sign in to comment.