Skip to content

Commit

Permalink
feat: hide import-api and update README
Browse files Browse the repository at this point in the history
  • Loading branch information
kungfuboy committed May 25, 2022
1 parent 049532b commit b713fb6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 17 deletions.
31 changes: 17 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,41 +51,44 @@
## 环境

- Node.js,版本大于 14.17.x
- pnpm, 版本大于 7.0.0

## 运行代码

我们在开发和构建时使用 [pnpm](https://pnpm.io) 作为包管理工具,强烈建议你也这么做,但如果您希望使用 npm 也完全没问题,只是在安装依赖时可能需要多花一些时间。

```
npm ci
npm start
pnpm i
pnpm start
```

如果想提高开发效率,可以安装 Angular 官方提供的命令行 Angular-cli 快速生成组件、服务等模板。

```
npm install -g @angular/cli
pnpm add @angular/cli --global
```

## 命令

### 运行

| 命令 | 描述 |
| ------------------------ | ------------------------------------ |
| `npm start` | 开发模式下,同时运行在浏览器和桌面端 |
| `npm run serve:web` | 仅运行在浏览器 |
| `npm run electron:serve` | 仅运行在桌面端 |
| 命令 | 描述 |
| --------------------- | ------------------------------------ |
| `pnpm start` | 开发模式下,同时运行在浏览器和桌面端 |
| `pnpm serve:web` | 仅运行在浏览器 |
| `pnpm electron:serve` | 仅运行在桌面端 |

### 打包构建

| 命令 | 描述 |
| ------------------------ | ------------------------ |
| `npm run build` | 各系统打包 Electron 应用 |
| 命令 | 描述 |
| ----------------- | ------------------------ |
| `sudo pnpm build` | 各系统打包 Electron 应用 |

### 运行测试

| 命令 | 描述 |
| -------------- | ------------ |
| `npm run test` | 执行单元测试 |
| 命令 | 描述 |
| ----------- | ------------ |
| `pnpm test` | 执行单元测试 |

# 协议

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ <h1 class="fs20 fwb">概况</h1>
<nz-divider></nz-divider>
<div class="r_row f_js">
<div class="card_container">
<div class="card_item">
<!-- <div class="card_item">
<nz-card [nzActions]="[importButton]">
<nz-card-meta nzTitle="导入" nzDescription="导入 API 数据"></nz-card-meta>
</nz-card>
<ng-template #importButton>
<i (click)="import()" nz-icon nzType="import"></i>
</ng-template>
</div>
</div> -->
<div class="card_item">
<nz-card [nzActions]="[exportButton]">
<nz-card-meta nzTitle="导出" nzDescription="导出 API 数据"></nz-card-meta>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export class ExportApiComponent implements OnInit {
if (result.status === StorageHandleStatus.success) {
result.data.version = packageJson.version;
try {
console.log(JSON.stringify(result, null, 2));
const output = module[action](result || {});
this.transferTextToFile(filename, output);
callback(true);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { processEnv } from 'eo/platform/node/constant';
import { StorageService } from '../../../shared/services/storage';

type FeatureType = {
Expand Down

0 comments on commit b713fb6

Please sign in to comment.