Skip to content

Commit

Permalink
chore: use pnpm #199
Browse files Browse the repository at this point in the history
  • Loading branch information
Mereithhh committed Mar 8, 2023
1 parent 1a250cc commit 04215f9
Show file tree
Hide file tree
Showing 27 changed files with 33,761 additions and 34,231 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
auto-install-peers=true
8 changes: 4 additions & 4 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"packages": [
"packages/*"
],
"version": "0.0.0"
"version": "0.0.0",
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useWorkspaces": true,
"npmClient": "pnpm"
}
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{
"name": "root",
"name": "vanblog",
"version": "0.48.0",
"private": true,
"scripts": {
"clean": "rm -rf node_modules packages/*/node_modules",
"build:test": "act -j test --secret-file=.env",
"dev": "node scripts/dev.js",
"dev": "lerna run dev --parallel --scope=@vanblog/server --scope=@vanblog/admin",
"dev:website": "lerna run dev --scope=@vanblog/theme-default",
"dev:admin": "lerna run dev --scope=@vanblog/admin",
"dev:server": "lerna run dev --scope=@vanblog/server",
"dev:server:noweb": "lerna run dev:noweb --scope=@vanblog/server",
"docs:build": "vuepress build docs",
"docs:clean-dev": "vuepress dev docs --clean-cache",
"docs:dev": "vuepress dev docs",
Expand All @@ -22,7 +27,7 @@
"devDependencies": {
"@vuepress/client": "2.0.0-beta.61",
"@vuepress/utils": "2.0.0-beta.61",
"lerna": "^4.0.0",
"lerna": "^6.5.1",
"standard-version": "^9.5.0",
"vue": "^3.2.47",
"vuepress": "2.0.0-beta.61",
Expand Down
1 change: 1 addition & 0 deletions packages/admin/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
auto-install-peers=true
2 changes: 1 addition & 1 deletion packages/admin/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const { REACT_APP_ENV } = process.env;
export default defineConfig({
hash: true,
base: '/admin/',
devServer: { https: true, port: 3002 },
devServer: { https: false, port: 3002 },
publicPath: process.env.EEE === 'production' ? '/admin/' : '/',
antd: {},
dva: {
Expand Down
14 changes: 8 additions & 6 deletions packages/admin/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "ant-design-pro",
"name": "@vanblog/admin",
"version": "5.2.0",
"private": true,
"description": "An out-of-box UI solution for enterprise applications",
"scripts": {
"analyze": "cross-env ANALYZE=1 umi build",
"build": " umi build",
"deploy": "npm run build && npm run gh-pages",
"dev": "npm run start:dev",
"dev": "cross-env REACT_APP_ENV=dev NODE_OPTIONS=--openssl-legacy-provider MOCK=none UMI_ENV=dev umi dev",
"gh-pages": "gh-pages -d dist",
"i18n-remove": "pro i18n-remove --locale=zh-CN --write",
"postinstall": "umi g tmp",
Expand All @@ -27,7 +27,6 @@
"start:dev": "cross-env REACT_APP_ENV=dev MOCK=none UMI_ENV=dev umi dev",
"start:no-mock": "cross-env MOCK=none UMI_ENV=dev umi dev",
"start:no-ui": "cross-env UMI_UI=none UMI_ENV=dev umi dev",
"start:node17": "cross-env NODE_OPTIONS=--openssl-legacy-provider MOCK=none UMI_ENV=dev PORT=3002 umi dev",
"start:pre": "cross-env REACT_APP_ENV=pre UMI_ENV=dev umi dev",
"start:test": "cross-env REACT_APP_ENV=test MOCK=none UMI_ENV=dev umi dev",
"test": "umi test",
Expand Down Expand Up @@ -70,11 +69,14 @@
"antd": "^4.19.0",
"antd-img-crop": "^4.2.4",
"btoa": "^1.2.1",
"bytemd": "^1.20.2",
"classnames": "^2.3.0",
"copy-to-clipboard": "^3.3.2",
"emoji-mart": "^5.2.1",
"front-matter": "^4.0.2",
"highlight.js": "^11.6.0",
"js-sha256": "^0.9.0",
"katex": "^0.16.4",
"lodash": "^4.17.0",
"moment": "^2.29.0",
"monaco-editor": "^0.34.0",
Expand All @@ -84,11 +86,11 @@
"rc-menu": "^9.1.0",
"rc-resize-observer": "^1.2.0",
"rc-util": "^5.16.0",
"react": "^17.0.0",
"react": "^17.0.2",
"react-contexify": "^5.0.0",
"react-dev-inspector": "^1.7.0",
"react-dom": "^17.0.0",
"react-helmet-async": "^1.2.0",
"react-dom": "^17.0.2",
"react-helmet-async": "^1.3.0",
"react-monaco-editor": "^0.50.1",
"remark-directive": "^2.0.1",
"umi": "^3.5.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/admin/src/pages/Article/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export default () => {
key="resize-observer"
onResize={(offset) => {
const r = offset.width < 1000;

setSimpleSearch(offset.width < 750);
setSimplePage(offset.width < 600);
if (r) {
Expand Down Expand Up @@ -119,10 +118,10 @@ export default () => {
}}
editable={false}
columnsState={{
persistenceKey: 'van-blog-article-table',
persistenceType: 'localStorage',
// persistenceKey: 'van-blog-article-table',
// persistenceType: 'localStorage',
value: colKeys,
onChange(value) {
onChange: (value) => {
setColKeys(value);
},
}}
Expand All @@ -138,6 +137,7 @@ export default () => {
onChange: (p, ps) => {
if (ps != pageSize) {
setPageSize(ps);

}
},
}}
Expand Down
6 changes: 3 additions & 3 deletions packages/admin/src/pages/Draft/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ export default () => {
}}
editable={false}
columnsState={{
persistenceKey: 'van-blog-draft-table',
persistenceType: 'localStorage',
// persistenceKey: 'van-blog-draft-table',
// persistenceType: 'localStorage',
value: colKeys,
onChange(value) {
setColKeys(value);
setColKeys(value)
},
}}
rowKey="id"
Expand Down
Loading

0 comments on commit 04215f9

Please sign in to comment.