- Documents
Getting Started ng addCreate scaffold ng gBusiness page Pluggable plugin staSwagger API generator Default parameter
Plugins are the add and remove of optional features, such as when you don't need code style (although I don't think so), only need to:
ng g ng-alain:plugin codeStyle -t=remove
Or add code style:
ng g ng-alain:plugin codeStyle
ng g ng-alain:plugin [plugin name] -t=[add | remove]
The [plugin name]
is plugin name, -t
supports two values add
(default) and remove
.
Code style rules:
Verify typescript with angular-eslint
Verify less with stylelint
Use prettier code formatting
Use husky to code verify and code format when git add
# add
ng g ng-alain:plugin codeStyle
# remove
ng g ng-alain:plugin codeStyle -t=remove
Support for Docker deployment.
# add
ng g ng-alain:plugin docker
# remove
ng g ng-alain:plugin docker -t=remove
Change the current default language, refer to: I18n - Default Language
# change to [en]
ng g ng-alain:plugin defaultLanguage --defaultLanguage=en
# change to [zh]
ng g ng-alain:plugin defaultLanguage --defaultLanguage=zh
# change to [zh-tw]
ng g ng-alain:plugin defaultLanguage --defaultLanguage=zh-tw
Name | Language pack name | Angular pack | Zorro pack | Delon pack |
---|---|---|---|---|
Simplified Chinese | zh-Hans,zh-cn,zh-Hans-CN,zh | zh-Hans,zh-cn,zh-Hans-CN,zh | zh_CN | zh_CN |
Traditional Chinese | zh-Hant,zh-tw,zh-Hant-TW | zh-Hant,zh-tw,zh-Hant-TW | zh_TW | zh_TW |
English (American) | en | en | en_US | en_US |
Turkish | tr | tr | tr_TR | tr_TR |
Polish | pl | pl | pl_PL | pl_PL |
Greek | el | el | el_GR | el_GR |
Korean | ko | ko | ko_KR | ko_KR |
Croatian | hr | hr | hr_HR | hr_HR |
Slovenian | sl | sl | sl_SI | sl_SI |
French | fr | fr | fr_FR | fr_FR |
Spanish | es | es | es_ES | es_ES |
Italian | it | it | it_IT | it_IT |
Allow chinese users to add a taobao mirror configuration file .npmrc
or .yarnrc
to solve network problems.
# add npm
ng g ng-alain:plugin networkEnv --packageManager=npm
# add yarn
ng g ng-alain:plugin networkEnv --packageManager=yarn
# remove npm
ng g ng-alain:plugin networkEnv --packageManager=npm -t=remove
# remove yarn
ng g ng-alain:plugin networkEnv --packageManager=yarn -t=remove
ng-alain-sts Plugins, Build Swagger APIs to list, edit pages, You can finish some interesting things.
# add
ng g ng-alain:plugin sts
# remove
ng g ng-alain:plugin sts -t=remove
From the project to analyze and generate static load Icon, The plugin will automatically generate two files in the src
directory:
src/style-icons.ts
Custom Icon (e.g: remote menu icon)
src/style-icons-auto.ts
command automatically generates files
Automatically exclude ng-zorro-antd and @delon already loaded icons.
ng g ng-alain:plugin icon
Also, you need to manually import in startup.service.ts
:
import { ICONS_AUTO } from '../../../style-icons-auto';
import { ICONS } from '../../../style-icons';
@Injectable()
export class StartupService {
constructor(iconSrv: NzIconService) {
iconSrv.addIcon(...ICONS_AUTO, ...ICONS);
}
}
Valid Grammar
<i class="anticon anticon-user"></i>
<i class="anticon anticon-question-circle-o"></i>
<i class="anticon anticon-spin anticon-loading"></i>
<i nz-icon class="anticon anticon-user"></i>
<i nz-icon nzType="align-{{type ? 'left' : 'right'}}"></i>
<i nz-icon [type]="type ? 'menu-fold' : 'menu-unfold'" [theme]="theme ? 'outline' : 'fill'"></i>
<i nz-icon [type]="type ? 'fullscreen' : 'fullscreen-exit'"></i>
<i nz-icon [nzType]="d.status === 'NORMAL' ? 'close1' : 'close2'"></i>
<i nz-icon nzType="{{ type ? 'arrow-left' : 'arrow-right' }}"></i>
<i nz-icon nzType="filter" theme="outline"></i>
<nz-input-group [nzAddOnBeforeIcon]="focus ? 'anticon anticon-arrow-down' : 'anticon anticon-search'"></nz-input-group>
Support RTL plug-in, the text direction is set to "from right to left".
ng g ng-alain:plugin rtl
The plug-in does not support hot swap, if you need to remove it, please handle it manually.