From 07475f84311869f3fb389d7e8ede702eb859cdd1 Mon Sep 17 00:00:00 2001 From: cyhhao Date: Wed, 14 Dec 2022 10:38:21 +0800 Subject: [PATCH] fix pkg warning --- package.json | 15 +++++---------- tsconfig.json | 5 +++-- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index db5c18a..6bf847f 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,7 @@ { "name": "git3-cli", "version": "1.0.0", - "main": "dist/index.js", "type": "module", - "types": "dist/index.d.ts", - "files": [ - "dist/" - ], "bin": "dist/index.js", "pkg": { "targets": [ @@ -25,7 +20,6 @@ "colors-cli": "^1.0.28", "commander": "^9.4.1", "debug": "^4.3.4", - "esbuild": "^0.16.4", "eth-ens-namehash": "^2.0.8", "ethers": "^5.7.2", "git-config-path": "^2.0.0", @@ -38,15 +32,16 @@ "superpathjoin": "^2.0.1" }, "scripts": { - "build": "yarn run clean && tsc", - "install-mac": "yarn pkg && cp ./bin/git3-cli-macos-x64 /usr/local/bin/git-remote-git3", - "install-mac-arm": "yarn pkg && cp ./bin/git3-cli-macos-arm64 /usr/local/bin/git-remote-git3", - "pkg": "yarn run build && pkg .", + "build": "yarn clean && tsc", + "install-mac": "yarn pkg && cp ./bin/index-macos-x64 /usr/local/bin/git-remote-git3", + "install-mac-arm": "yarn pkg && cp ./bin/index-macos-arm64 /usr/local/bin/git-remote-git3", + "pkg": "yarn build && pkg ./dist/index.js --out-path bin/ --targets node18-macos-x64,node18-macos-arm64,node18-linux-x64,node18-win-x64", "build:git3": "esbuild ./src/git3/index.js --bundle --platform=node --target=es6 --outfile=dist/git3.js", "pkg:git3": "yarn build:git3 && pkg dist/git3.js --output bin/git3 && cp bin/git3 /usr/local/bin/git3", "clean": "rm -rf ./dist ./bin" }, "devDependencies": { + "esbuild": "^0.16.4", "@types/buffer-split": "^1.0.0", "@types/debug": "^4.1.7", "@types/node": "^18.11.10", diff --git a/tsconfig.json b/tsconfig.json index 150709a..f01dd05 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ "es5", "es6" ], /* Specify library files to be included in the compilation. */ - "allowJs": true, /* Allow javascript files to be compiled. */ + "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ "declaration": true, /* Generates corresponding '.d.ts' file. */ @@ -64,6 +64,7 @@ "exclude": [ "node_modules", "test", - "types" + "types", + "src/git3" ] } \ No newline at end of file