|
1 周之前 | |
---|---|---|
.. | ||
demo | 1 周之前 | |
ng-add | 1 周之前 | |
ng-component | 1 周之前 | |
ng-generate | 1 周之前 | |
ng-update | 1 周之前 | |
testing | 1 周之前 | |
utils | 1 周之前 | |
README.md | 1 周之前 | |
collection.json | 1 周之前 | |
migration.json | 1 周之前 | |
tsconfig.json | 1 周之前 |
添加 ng-zorro-antd 与它的依赖,并根据需要自动配置。
package.json
app.component.html
引导内容将用于自定义的 theme.less
或编译后的 css 导入 angular.json
$ ng add ng-zorro-antd [--locale=zh-CN] [--theme] [--skipPackageJson]
npm run schematic:build
编译到 publish 文件夹npm run schematic:demo
从 demo 生成 schematicsnode ./schematics_script/set-version.js
从 package.json 设置版本号node ./schematics_script/set-theme.js
从 scripts/site/_site/doc/theme.less 设置自定义样式内容生成 publish 之后,创建一个新的 ng 项目。
npm run generate
生成 publish
文件夹cd publish && npm link
ng new schematic-debug
cd schematic-debug && npm link ng-zorro-antd
schematic:build
修改代码后编译cd schematic-debug
切换到 ng 项目git checkout . && git clean -fd
还原更改ng g ng-zorro-antd:[schematic]
运行 schematic发布
原有发布流程不变,但是 schematics/utils/custom-theme.ts
和 schematics/utils/lib-versions.ts
内容为动态生成,不提交到版本管理。