From 436d7d5d064c738832afedbdcee4877a5284e87a Mon Sep 17 00:00:00 2001 From: Chris Barbour Date: Mon, 4 Mar 2024 10:14:53 +0000 Subject: [PATCH] createing js version --- package.json | 8 ++++---- tsconfig.cjs.json | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 5993638..e905bf3 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "version": "1.0.0", "bin": { - "schema-api-ts": "src/cli.ts" + "schema-api-ts": "dist/esm/cli.js" }, "types": "dist/esm/index.d.ts", "exports": { @@ -24,11 +24,11 @@ "dist" ], "scripts": { - "prebuild": "node --loader ts-node/esm --no-warnings ./src/cli.ts generate -h $(pwd)/test/schema-example.ts v=1.0.0", "build:esm": "tsc --project tsconfig.json && echo '{\"type\": \"module\"}' > dist/esm/package.json", "build:cjs": "tsc --project tsconfig.cjs.json && echo '{\"type\": \"commonjs\"}' > dist/cjs/package.json", - "build": "npm run build:esm && npm run build:cjs", - "test": "jest --ci --runInBand --coverage --reporters=default --reporters=jest-junit --passWithNoTests", + "build": "npm run build:esm && npm run build:cjs && chmod +x ./dist/esm/cli.js", + "generate": "./dist/esm/cli.js generate -h $(pwd)/test/schema-example.ts v=1.0.0", + "test": "npm run generate && jest --ci --runInBand --coverage --reporters=default --reporters=jest-junit --passWithNoTests", "lint": "eslint **/*.ts" }, "eslintConfig": { diff --git a/tsconfig.cjs.json b/tsconfig.cjs.json index 95e99a3..32838aa 100644 --- a/tsconfig.cjs.json +++ b/tsconfig.cjs.json @@ -4,4 +4,5 @@ "outDir": "./dist/cjs", "module": "commonjs", }, + "exclude": ["src/cli.ts"] }