内容
# Angular 组件库工作区
该项目是一个为构建可重用组件库而设置的 Angular 工作区。
## 结构
- 工作区包含一个库项目 (`my-components`) 用于你的 Angular 组件。
- 使用 SCSS 进行样式设计。
- 所有选择器都以 `cmp-` 为前缀。
## 开始使用
1. **安装依赖**(已完成):
```sh
npm install
```
2. **构建库:**
```sh
npm run build my-components
```
3. **开发组件:**
- 使用 Angular CLI 添加新组件:
```sh
npm run ng generate component <component-name> --project=my-components
```
- 将 `<component-name>` 替换为你想要的名称。
4. **测试库:**
```sh
npm test my-components
```
5. **发布:**
- 构建完成后,输出将位于 `dist/my-components`。
- 发布到 npm 或在其他 Angular 项目中作为依赖使用。
## 更多信息
- [Angular CLI 文档](https://angular.io/cli)
- [Angular 库指南](https://angular.io/guide/creating-libraries)