Skip to content

Commit c57d473

Browse files
authored
Merge pull request #48 from uniquemo/chore/pnpm
chore: import pnpm to replace yarn
2 parents 94874e5 + c51390c commit c57d473

File tree

11 files changed

+9357
-9035
lines changed

11 files changed

+9357
-9035
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ jobs:
1313
- uses: actions/checkout@v2
1414
- uses: actions/setup-node@v2
1515
with:
16-
node-version: '12.x'
16+
node-version: '14.x'
1717
registry-url: 'https://registry.npmjs.org'
18-
- run: yarn
19-
- run: yarn build
18+
- run: npm install -g pnpm
19+
- run: pnpm install
20+
- run: pnpm run build
2021
- name: Copy folder content recursively to remote
2122
uses: garygrossgarten/github-action-scp@release
2223
with:

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
FROM node:latest AS builder
2+
23
WORKDIR /usr/src/app
3-
COPY package.json yarn.lock ./
4-
RUN yarn
4+
5+
RUN npm install -g pnpm
6+
COPY package.json pnpm-lock.yaml ./
7+
RUN pnpm install
58
COPY . ./
6-
RUN yarn build
9+
RUN pnpm run build
710

811
FROM nginx
912
COPY --from=builder /usr/src/app/dist /usr/share/nginx/html

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# React Netease Music
22
React Netease Music——一个基于React、TypeScript的高仿网易云mac客户端播放器。
33

4-
一直想写一个音乐播放器把玩把玩,最近无意中发现很早就有人整理出了相关的API,话不多说,撸起来!代码使用React编写,没有使用额外的数据管理库(因为react hook真的挺方便的),欢迎提出你的意见,喜欢的话请给我一个star哈~
5-
64
## 项目体验地址
75
[高仿网易云音乐播放器——音为爱呀😍](http://www.uniquemo.cn/discovery)
86

@@ -79,9 +77,10 @@ React Netease Music——一个基于React、TypeScript的高仿网易云mac客
7977

8078
## 项目启动
8179
- 首先将上面👆提到的API接口部分,两个API服务代码拉到本地,并启动对应的服务;
80+
- [安装`pnpm`包管理工具](https://pnpm.io/installation)
8281
- 然后拉取本仓库代码,并执行以下命令:
8382
```
84-
yarn
85-
yarn dev:local
83+
pnpm install
84+
pnpm run dev:local
8685
```
8786
- 最后在浏览器中访问:`http://localhost:8080`

deploy/bash.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
echo "Start to deploy react-netease-music"
66

7-
yarn build
7+
pnpm run build
88
scp -r ./dist/** root@www.uniquemo.cn:/usr/share/nginx/html
99

1010
echo "Successfully deploy react-netease-music"

package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
22
"name": "react-netease-music",
3-
"version": "1.2.1",
3+
"version": "1.2.3",
44
"description": "基于React、TypeScript的高仿网易云mac客户端播放器",
55
"main": "index.js",
66
"scripts": {
7-
"dev:local": "LOCAL=true node --trace-deprecation node_modules/.bin/webpack serve --mode=development --config config/webpack.config.babel.js",
8-
"dev": "node --trace-deprecation node_modules/.bin/webpack serve --mode=development --config config/webpack.config.babel.js",
7+
"dev:local": "LOCAL=true webpack serve --mode=development --config config/webpack.config.babel.js",
8+
"dev": "webpack serve --mode=development --config config/webpack.config.babel.js",
99
"build": "webpack --mode=production --config config/webpack.config.babel.js",
1010
"type-check": "tsc --watch",
1111
"lint": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
1212
"style-lint": "stylelint 'src/**/*.css' --fix",
1313
"release": "./deploy/bash.sh",
1414
"docker-release": "./deploy/docker.sh",
1515
"changelog-gen": "conventional-changelog -p angular -i CHANGELOG.md -s",
16-
"version": "yarn changelog-gen && git add CHANGELOG.md",
16+
"version": "pnpm run changelog-gen && git add CHANGELOG.md",
1717
"postversion": "git commit -m 'feat: update CHANGELOG.md' && git push",
18-
"version-patch": "npm version patch && yarn version",
19-
"version-minor": "npm version minor && yarn version",
20-
"version-major": "npm version major && yarn version"
18+
"version-patch": "npm version patch && pnpm run version",
19+
"version-minor": "npm version minor && pnpm run version",
20+
"version-major": "npm version major && pnpm run version"
2121
},
2222
"repository": {
2323
"type": "git",
@@ -64,7 +64,7 @@
6464
"@babel/preset-react": "^7.9.4",
6565
"@babel/preset-typescript": "^7.9.0",
6666
"@babel/register": "^7.9.0",
67-
"@types/classnames": "^2.2.10",
67+
"@babel/runtime": "^7.16.7",
6868
"@types/react": "^16.9.55",
6969
"@types/react-dom": "^16.9.9",
7070
"@types/react-router-dom": "^5.1.4",
@@ -104,9 +104,10 @@
104104
"@apollo/client": "^3.3.20",
105105
"@blueprintjs/core": "^3.26.0",
106106
"@uniquemo/mui": "^0.0.3",
107-
"axios": "^0.19.2",
107+
"axios": "^0.25.0",
108108
"classnames": "^2.2.6",
109109
"graphql": "^15.5.0",
110+
"normalize.css": "^8.0.1",
110111
"react": "^17.0.2",
111112
"react-dom": "^17.0.2",
112113
"react-router-dom": "^5.1.2"

0 commit comments

Comments
 (0)