Skip to content

Commit

Permalink
build: npm to yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
brickspert committed Oct 2, 2021
1 parent e0ca12a commit a4a6f20
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 21 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm intall, build, and test
- name: yarn intall, build, and test
run: |
npm run init
npm run test
yarn run init
yarn run test
env:
CI: true
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ language: node_js
node_js:
- 'lts/*'
install:
- npm install
- npm run bootstrap
- npm install -g surge
- yarn install
- yarn run bootstrap
- yarn install -g surge
script:
- npm run build:doc
- yarn run build:doc
- surge ./dist ahooks-$(git rev-parse --short HEAD).surge.sh
cache:
directories:
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.MD
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@

2. 如果你修复了一个 bug 或者新增了一个功能,请确保写了相应的测试,这很重要。

3. 确认所有的测试是通过的 `npm run test`
3. 确认所有的测试是通过的 `yarn run test`


## 开发流程

在你 clone 代码并且使用 `npm run init` 安装完依赖后,你还可以运行下面几个常用的命令:
在你 clone 代码并且使用 `yarn run init` 安装完依赖后,你还可以运行下面几个常用的命令:

1. `npm start` 在本地运行 `ahooks` 网站。
1. `yarn start` 在本地运行 `ahooks` 网站。

2. `npm run test` 运行测试。
2. `yarn run test` 运行测试。

3. `npm run build` 构建编译。
3. `yarn run build` 构建编译。
10 changes: 5 additions & 5 deletions CONTRIBUTING.en-US.MD
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ Before submitting a pull request, please make sure the following is done:

2. If you've fixed a bug or added code that should be tested, add tests!

3. Ensure the test suite passes `npm run test`
3. Ensure the test suite passes `yarn run test`

## Development Workflow

After cloning antd, run `npm install` to fetch its dependencies. Then, you can run several commands:
After cloning antd, run `yarn run init` to fetch its dependencies. Then, you can run several commands:

1. `npm start` runs `ahooks` website locally。
1. `yarn start` runs `ahooks` website locally。

2. `npm run test` runs the complete test suite。
2. `yarn run test` runs the complete test suite。

3. `npm run build` creates UMD build of `ahooks`
3. `yarn run build` creates UMD build of `ahooks`
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ import { useRequest } from 'ahooks';
```
$ git clone git@github.com:alibaba/hooks.git
$ cd hooks
$ npm run init
$ npm start
$ yarn run init
$ yarn start
```

Open your browser and visit http://127.0.0.1:8001 , see more at Development.
Expand Down
4 changes: 2 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ import { useRequest } from 'ahooks';
```
$ git clone git@github.com:alibaba/hooks.git
$ cd hooks
$ npm run init
$ npm start
$ yarn run init
$ yarn start
```

打开浏览器访问 http://127.0.0.1:8001
Expand Down
1 change: 1 addition & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"packages": ["packages/*"],
"npmClient": "yarn",
"command": {
"version": {
"allowBranch": "master",
Expand Down

0 comments on commit a4a6f20

Please sign in to comment.