Update build process and bump version

Removed CLI entrypoint from main build file and created a separate build script for it. Adjusted corresponding configurations in `package.json` to reflect these changes, including updating version from 1.0.14 to 1.0.21.
This commit is contained in:
2024-11-24 11:01:43 -05:00
parent 102fd530c6
commit b10b9085b2
2 changed files with 9 additions and 7 deletions

View File

@@ -1,7 +1,8 @@
import isolatedDecl from 'bun-plugin-isolated-decl'; import isolatedDecl from 'bun-plugin-isolated-decl';
// handles building the library
await Bun.build({ await Bun.build({
entrypoints: ['./src/cli.ts', './src/index.ts'], entrypoints: ['./src/index.ts'],
outdir: './dist', outdir: './dist',
target: 'node', target: 'node',
plugins: [ plugins: [

View File

@@ -1,6 +1,6 @@
{ {
"name": "code-tokenizer-md", "name": "code-tokenizer-md",
"version": "1.0.14", "version": "1.0.21",
"type": "module", "type": "module",
"main": "src/index.ts", "main": "src/index.ts",
"module": "src/index.ts", "module": "src/index.ts",
@@ -13,22 +13,23 @@
} }
}, },
"bin": { "bin": {
"code-tokenizer-md": "./dist/cli.js" "code-tokenizer-md": "./dist/code-tokenizer-md"
}, },
"files": [ "files": [
"dist" "dist"
], ],
"types": "", "types": "",
"scripts": { "scripts": {
"build": "rm -rf dist && bun ./build.ts", "build": "rm -rf dist && bun ./build.ts && bun build:cli",
"build:cli": "bun build ./src/cli.ts --compile --outfile dist/code-tokenizer-md",
"test": "bun test", "test": "bun test",
"prepublishOnly": "npm run build", "prepublishOnly": "bun run build",
"dev": "bun run .", "dev": "bun run .",
"deploy:dev": "bun run build && pnpm publish .", "deploy:dev": "bun run build && bun publish .",
"lint": "eslint src/", "lint": "eslint src/",
"lint:fix": "eslint src/ --fix", "lint:fix": "eslint src/ --fix",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md,yml,yaml}\"", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md,yml,yaml}\"",
"fix": "pnpm format && pnpm lint:fix" "fix": "bun format && bun lint:fix"
}, },
"dependencies": { "dependencies": {
"llama3-tokenizer-js": "^1.0.0", "llama3-tokenizer-js": "^1.0.0",