chore: 更新依赖,优化wsl下开发体验

This commit is contained in:
lblblong
2021-11-18 14:52:07 +08:00
parent 112fa6e55e
commit e449e92f5a
7 changed files with 43 additions and 44 deletions
+1 -2
View File
@@ -3,8 +3,7 @@
/node_modules /node_modules
/build /build
/.cache /.cache
/utools/build /public/index.js
/utools/index.js
/.parcel-cache /.parcel-cache
# Logs # Logs
+5 -5
View File
@@ -8,16 +8,16 @@
"scripts": { "scripts": {
"serve": "vite build -w", "serve": "vite build -w",
"serve:preload": "cd ./packages/preload && npm run serve", "serve:preload": "cd ./packages/preload && npm run serve",
"build": "npm run build:html && npm run build:preload", "build": "npm run build:preload && npm run build:html",
"build:html": "rm -rf ./utools/build && vite build && cp -r ./build ./utools", "build:html": "vite build",
"build:preload": "cd ./packages/preload && npm run build", "build:preload": "cd ./packages/preload && npm run build",
"commit": "git-cz" "commit": "git-cz"
}, },
"dependencies": { "dependencies": {
"classnames": "^2.3.1", "classnames": "^2.3.1",
"dayjs": "^1.10.7", "dayjs": "^1.10.7",
"history": "^5.0.0", "is-wsl": "^2.2.0",
"lbl-popups": "^1.0.0", "lbl-popups": "^1.1.1",
"mobx": "^6.3.3", "mobx": "^6.3.3",
"mobx-react": "^7.2.0", "mobx-react": "^7.2.0",
"react": "^17.0.2", "react": "^17.0.2",
@@ -37,7 +37,7 @@
"typescript": "^4.1.2", "typescript": "^4.1.2",
"utility-types": "^3.10.0", "utility-types": "^3.10.0",
"utools-helper": "^1.4.6", "utools-helper": "^1.4.6",
"vite": "^2.6.13" "vite": "^2.6.14"
}, },
"config": { "config": {
"commitizen": { "commitizen": {
+2 -2
View File
@@ -3,7 +3,7 @@
"version": "0.0.1", "version": "0.0.1",
"private": true, "private": true,
"homepage": ".", "homepage": ".",
"app": "../../utools/index.js", "app": "../../public/index.js",
"targets": { "targets": {
"app": { "app": {
"source": "src/index.ts", "source": "src/index.ts",
@@ -13,7 +13,7 @@
} }
}, },
"scripts": { "scripts": {
"build": "rm -rf ../utools/index.js && parcel build" "build": "rm -rf ../public/index.js && parcel build"
}, },
"dependencies": { "dependencies": {
"localtunnel": "^2.0.2", "localtunnel": "^2.0.2",
+28 -31
View File
@@ -14,8 +14,8 @@ importers:
csstype: ^3.0.9 csstype: ^3.0.9
cz-customizable: ^6.3.0 cz-customizable: ^6.3.0
dayjs: ^1.10.7 dayjs: ^1.10.7
history: ^5.0.0 is-wsl: ^2.2.0
lbl-popups: ^1.0.0 lbl-popups: ^1.1.1
mobx: ^6.3.3 mobx: ^6.3.3
mobx-react: ^7.2.0 mobx-react: ^7.2.0
react: ^17.0.2 react: ^17.0.2
@@ -25,12 +25,12 @@ importers:
typescript: ^4.1.2 typescript: ^4.1.2
utility-types: ^3.10.0 utility-types: ^3.10.0
utools-helper: ^1.4.6 utools-helper: ^1.4.6
vite: ^2.6.13 vite: ^2.6.14
dependencies: dependencies:
classnames: 2.3.1 classnames: 2.3.1
dayjs: 1.10.7 dayjs: 1.10.7
history: 5.0.1 is-wsl: 2.2.0
lbl-popups: 1.1.0[email protected][email protected] lbl-popups: 1.1.1[email protected][email protected]
mobx: 6.3.3 mobx: 6.3.3
mobx-react: 7.2.0_8aec6830c9f393111667240500a3b25c mobx-react: 7.2.0_8aec6830c9f393111667240500a3b25c
react: 17.0.2 react: 17.0.2
@@ -49,7 +49,7 @@ importers:
typescript: 4.4.3 typescript: 4.4.3
utility-types: 3.10.0 utility-types: 3.10.0
utools-helper: 1.5.1 utools-helper: 1.5.1
vite: 2.6.13[email protected] vite: 2.6.14[email protected]
packages/localtunnel: packages/localtunnel:
specifiers: specifiers:
@@ -1794,20 +1794,20 @@ packages:
minimist: 1.2.5 minimist: 1.2.5
dev: true dev: true
/@commitlint/execute-rule/13.2.0: /@commitlint/execute-rule/15.0.0:
resolution: {integrity: sha512-6nPwpN0hwTYmsH3WM4hCdN+NrMopgRIuQ0aqZa+jnwMoS/g6ljliQNYfL+m5WO306BaIu1W3yYpbW5aI8gEr0g==} resolution: {integrity: sha512-pyE4ApxjbWhb1TXz5vRiGwI2ssdMMgZbaaheZq1/7WC0xRnqnIhE1yUC1D2q20qPtvkZPstTYvMiRVtF+DvjUg==}
engines: {node: '>=v12'} engines: {node: '>=v12'}
dev: true dev: true
optional: true optional: true
/@commitlint/load/13.2.1: /@commitlint/load/15.0.0:
resolution: {integrity: sha512-qlaJkj0hfa9gtWRfCfbgFBTK3GYQRmjZhba4l9mUu4wV9lEZ4ICFlrLtd/8kaLXf/8xbrPhkAPkVFOAqM0YwUQ==} resolution: {integrity: sha512-Ak1YPeOhvxmY3ioe0o6m1yLGvUAYb4BdfGgShU8jiTCmU3Mnmms0Xh/kfQz8AybhezCC3AmVTyBLaBZxOHR8kg==}
engines: {node: '>=v12'} engines: {node: '>=v12'}
requiresBuild: true requiresBuild: true
dependencies: dependencies:
'@commitlint/execute-rule': 13.2.0 '@commitlint/execute-rule': 15.0.0
'@commitlint/resolve-extends': 13.2.0 '@commitlint/resolve-extends': 15.0.0
'@commitlint/types': 13.2.0 '@commitlint/types': 15.0.0
'@endemolshinegroup/cosmiconfig-typescript-loader': 3.0.2_4b317b069e4dad36c8619feea2045a32 '@endemolshinegroup/cosmiconfig-typescript-loader': 3.0.2_4b317b069e4dad36c8619feea2045a32
chalk: 4.1.2 chalk: 4.1.2
cosmiconfig: 7.0.1 cosmiconfig: 7.0.1
@@ -1817,8 +1817,8 @@ packages:
dev: true dev: true
optional: true optional: true
/@commitlint/resolve-extends/13.2.0: /@commitlint/resolve-extends/15.0.0:
resolution: {integrity: sha512-HLCMkqMKtvl1yYLZ1Pm0UpFvd0kYjsm1meLOGZ7VkOd9G/XX+Fr1S2G5AT2zeiDw7WUVYK8lGVMNa319bnV+aw==} resolution: {integrity: sha512-7apfRJjgJsKja7lHsPfEFixKjA/fk/UeD3owkOw1174yYu4u8xBDLSeU3IinGPdMuF9m245eX8wo7vLUy+EBSg==}
engines: {node: '>=v12'} engines: {node: '>=v12'}
dependencies: dependencies:
import-fresh: 3.3.0 import-fresh: 3.3.0
@@ -1828,8 +1828,8 @@ packages:
dev: true dev: true
optional: true optional: true
/@commitlint/types/13.2.0: /@commitlint/types/15.0.0:
resolution: {integrity: sha512-RRVHEqmk1qn/dIaSQhvuca6k/6Z54G+r/KyimZ8gnAFielGiGUpsFRhIY3qhd5rXClVxDaa3nlcyTWckSccotQ==} resolution: {integrity: sha512-OMSLX+QJnyNoTwws54ULv9sOvuw9GdVezln76oyUd4YbMMJyaav62aSXDuCdWyL2sm9hTkSzyEi52PNaIj/vqw==}
engines: {node: '>=v12'} engines: {node: '>=v12'}
dependencies: dependencies:
chalk: 4.1.2 chalk: 4.1.2
@@ -5633,6 +5633,10 @@ packages:
cssom: 0.3.8 cssom: 0.3.8
dev: true dev: true
/csstype/3.0.10:
resolution: {integrity: sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==}
dev: false
/csstype/3.0.9: /csstype/3.0.9:
resolution: {integrity: sha512-rpw6JPxK6Rfg1zLOYCSwle2GFOOsnjmDYDaBwEcwoOg4qlsIVCN789VkBZDJAGi4T07gI4YSutR43t9Zz4Lzuw==} resolution: {integrity: sha512-rpw6JPxK6Rfg1zLOYCSwle2GFOOsnjmDYDaBwEcwoOg4qlsIVCN789VkBZDJAGi4T07gI4YSutR43t9Zz4Lzuw==}
dev: true dev: true
@@ -5652,7 +5656,7 @@ packages:
longest: 2.0.1 longest: 2.0.1
word-wrap: 1.2.3 word-wrap: 1.2.3
optionalDependencies: optionalDependencies:
'@commitlint/load': 13.2.1 '@commitlint/load': 15.0.0
dev: true dev: true
/cz-customizable/6.3.0: /cz-customizable/6.3.0:
@@ -7781,12 +7785,6 @@ packages:
resolution: {integrity: sha512-yR5lWvNz7c85OhVAEAeFhVCc/GV4C30Fjzc/rCP0aCWzc1UUOPUk55dK/qdwTZHBvMZo+eZ2jpk62ndX/xMFlg==} resolution: {integrity: sha512-yR5lWvNz7c85OhVAEAeFhVCc/GV4C30Fjzc/rCP0aCWzc1UUOPUk55dK/qdwTZHBvMZo+eZ2jpk62ndX/xMFlg==}
dev: true dev: true
/history/5.0.1:
resolution: {integrity: sha512-5qC/tFUKfVci5kzgRxZxN5Mf1CV8NmJx9ByaPX0YTLx5Vz3Svh7NYp6eA4CpDq4iA9D0C1t8BNIfvQIrUI3mVw==}
dependencies:
'@babel/runtime': 7.15.4
dev: false
/hmac-drbg/1.0.1: /hmac-drbg/1.0.1:
resolution: {integrity: sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=} resolution: {integrity: sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=}
dependencies: dependencies:
@@ -8386,7 +8384,6 @@ packages:
resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==}
engines: {node: '>=8'} engines: {node: '>=8'}
hasBin: true hasBin: true
dev: true
/is-extendable/0.1.1: /is-extendable/0.1.1:
resolution: {integrity: sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=} resolution: {integrity: sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=}
@@ -8646,7 +8643,6 @@ packages:
engines: {node: '>=8'} engines: {node: '>=8'}
dependencies: dependencies:
is-docker: 2.2.1 is-docker: 2.2.1
dev: true
/isarray/1.0.0: /isarray/1.0.0:
resolution: {integrity: sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=} resolution: {integrity: sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=}
@@ -9473,12 +9469,13 @@ packages:
webpack-sources: 1.4.3 webpack-sources: 1.4.3
dev: true dev: true
/lbl-popups/1.1.0[email protected][email protected]: /lbl-popups/1.1.1[email protected][email protected]:
resolution: {integrity: sha512-QRBCP+6KhxfDorUGRAwEEcWT6PiBWKrxg3w6ygbjQ33N6dP1nU5qfuwbpUEt9YrsF+xmzrRFdElYgvYikJkboA==} resolution: {integrity: sha512-wLzN5dTM3HXGQXwnOurcmPnt+XVFVx+UlBHSeO/hsCEjEq0qofMvSXCq4VR/3x7us1xAwRu3Ozji5C/M2qTPgQ==}
engines: {node: '>=10'} engines: {node: '>=10'}
peerDependencies: peerDependencies:
react: ^16.0.0 react: '>=16'
dependencies: dependencies:
csstype: 3.0.10
rc-dialog: 8.6[email protected][email protected] rc-dialog: 8.6[email protected][email protected]
rc-drawer: 4.4[email protected][email protected] rc-drawer: 4.4[email protected][email protected]
react: 17.0.2 react: 17.0.2
@@ -14529,8 +14526,8 @@ packages:
extsprintf: 1.3.0 extsprintf: 1.3.0
dev: true dev: true
/vite/2.6.13[email protected]: /vite/2.6.14[email protected]:
resolution: {integrity: sha512-+tGZ1OxozRirTudl4M3N3UTNJOlxdVo/qBl2IlDEy/ZpTFcskp+k5ncNjayR3bRYTCbqSOFz2JWGN1UmuDMScA==} resolution: {integrity: sha512-2HA9xGyi+EhY2MXo0+A2dRsqsAG3eFNEVIo12olkWhOmc8LfiM+eMdrXf+Ruje9gdXgvSqjLI9freec1RUM5EA==}
engines: {node: '>=12.2.0'} engines: {node: '>=12.2.0'}
hasBin: true hasBin: true
peerDependencies: peerDependencies:

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

+2 -2
View File
@@ -3,10 +3,10 @@
"description": "内网穿透", "description": "内网穿透",
"author": "lblblong", "author": "lblblong",
"homepage": "https://github.com/lblblong/nat-utools", "homepage": "https://github.com/lblblong/nat-utools",
"main": "./build/index.html", "main": "./index.html",
"preload": "./index.js", "preload": "./index.js",
"version": "2.0.0", "version": "2.0.0",
"logo": "assets/logo.png", "logo": "./logo.png",
"platform": ["win32", "darwin", "linux"], "platform": ["win32", "darwin", "linux"],
"features": [ "features": [
{ {
+5 -2
View File
@@ -1,12 +1,15 @@
import react from '@vitejs/plugin-react' import react from '@vitejs/plugin-react'
import path from 'path' import path from 'path'
import { defineConfig } from 'vite' import { defineConfig } from 'vite'
import isWsl from 'is-wsl'
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
build: { build: {
sourcemap: false, sourcemap: false,
outDir: 'build' emptyOutDir: true,
// wsl 下输出到 c 盘目录
outDir: isWsl ? '/mnt/c/code/utools/nat-utools' : 'dist',
}, },
base: './', base: './',
plugins: [react()], plugins: [react()],
@@ -21,5 +24,5 @@ export default defineConfig({
replacement: '', replacement: '',
}, },
], ],
} },
}) })