From 08fb4d801f94115be37e8d21b45e583d1c96931d Mon Sep 17 00:00:00 2001 From: di-sukharev Date: Sun, 3 Sep 2023 15:29:29 +0800 Subject: [PATCH] chore: add .npmignore file and update package.json to include specific files in the "files" field The .npmignore file is added to the project. It currently includes the file "out/github-action.cjs" to be ignored when publishing the package to npm. In the package.json file, the "files" field is updated to include the files "out/cli.cjs" and "out/tiktoken_bg.wasm". This ensures that these files are included when publishing the package to npm. The "deploy" script in the package.json file is also updated to include pushing tags to the remote repository using "git push --tags". This ensures that the newly created version tags are pushed along with the code changes. --- .npmignore | 1 + package.json | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..715ed92 --- /dev/null +++ b/.npmignore @@ -0,0 +1 @@ +out/github-action.cjs \ No newline at end of file diff --git a/package.json b/package.json index 1e11381..fe238bb 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "author": "https://github.com/di-sukharev", "license": "MIT", "files": [ - "out/**/*" + "out/cli.cjs", + "out/tiktoken_bg.wasm" ], "release": { "branches": [ @@ -42,7 +43,7 @@ "dev": "ts-node ./src/cli.ts", "build": "rimraf out && node esbuild.config.js", "build:push": "npm run build && git add . && git commit -m 'build' && git push", - "deploy": "npm run build:push && npm version patch && git push --follow-tags && npm publish --tag latest", + "deploy": "npm run build:push && npm version patch && git push --tags && npm publish --tag latest", "lint": "eslint src --ext ts && tsc --noEmit", "format": "prettier --write src" },