From 740c8272ae256fb6b431ae6b46f7b6be767609e8 Mon Sep 17 00:00:00 2001 From: Masoud Ghorbani Date: Sun, 18 Aug 2024 17:39:36 +0200 Subject: [PATCH] chore: update preversion script to include linting, building, formatting, and generating docs --- package.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 77a6111..f6c7734 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ }, "scripts": { "prepare": "is-ci || husky", - "build": "rm -rf ./dist && tsc -p tsconfig.build.json", + "build": "pnpm run clean && tsc -p tsconfig.build.json", "build:watch": "tsc -p tsconfig.build.json -w", "build:type-check": "tsc -p tsconfig.build.json --noEmit", "test": "node --trace-warnings --experimental-vm-modules 'node_modules/jest/bin/jest.js'", @@ -34,8 +34,9 @@ "lint:fix": "eslint . --fix", "docs:build": "pnpm run build && rm -rf ./docs && ./node_modules/.bin/jsdoc -c jsdoc.json", "docs:start": "pnpm run docs:build && ./node_modules/.bin/http-server -c-1 -o docs", - "preversion": "pnpm run build && pnpm run format", - "cat-code": "cat package.json README.md > scs-code-prompt && find ./src ./test -type f -name '*.ts' -exec cat {} + >> scs-code-prompt" + "preversion": "pnpm run lint && pnpm run build && pnpm run format && pnpm run docs:build", + "clean": "rm -rf ./dist ./docs", + "start": "node dist/esm/index.js" }, "lint-staged": { "(/test/.*\\.test\\.ts)$": [