0.0.1 • Published 2 years ago

sk-train v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

SkTrain

这个库是用Angular CLI 12.1.0 版本生成的。

#代码脚手架

运行' ng generate component component-name——project sk-train '生成一个新组件。 你也可以使用 ng generate directive|pipe|service|class|guard|interface|enum|module——project sk-train。
注意:不要忘记添加“——project sk-train”,否则它将被添加到你的“angular”中的默认项目中。 json 文件。

#构建

运行' ng build sk-train '来构建项目。 构建工件将存储在' dist/ '目录中。

#出版

用' ng build sk-train '构建完库后,进入 dist 文件夹' cd dist/sk-train ',运行' npm publish '。

FAQ:

errorTips:

ERROR: Trying to publish a package that has been compiled by Ivy in full compilation mode.  This is not allowed.
Please delete and rebuild the package with Ivy partial compilation mode, before attempting to publish.

## 错误:试图发布一个已被Ivy以完全编译模式编译的包。 这是不允许的。
在尝试发布之前,请删除并使用Ivy部分编译模式重新构建包。

solution: 使用部分编译模式重新构建包

## tsconfig.lib.json
{
  "compilerOptions": {
    "compilationMode": "partial"
  }
}

ng build sk-train

##运行单元测试

通过Karma运行' ng test sk-train '来执行单元测试。

#进一步帮助

要想获得更多关于 Angular CLI 的帮助,请使用' ng help ',或者查看Angular CLI Overview and Command Reference页面。