diff --git a/package.json b/package.json index 84e7551..513e193 100644 --- a/package.json +++ b/package.json @@ -14,9 +14,9 @@ "lint": "standardx -v \"./**/*.ts\"", "test": "npm run lint && node test/cli.js | tap-arc && npm run test-html", "test-html": "npm run lint && node test/index.js | tap-arc", - "build-cjs": "esbuild src/**/*.ts --format=cjs --keep-names --outdir=./dist --out-extension:.js=.cjs", + "build-cjs": "esbuild src/**/*.ts --tsconfig=tsconfig.build.json --format=cjs --keep-names --outdir=./dist --out-extension:.js=.cjs", "build-bin": "mkdir -p ./dist/bin && rm -rf ./dist/bin/* && cp ./bin/to-string.js ./bin/resize.js ./dist/bin", - "build": "mkdir -p ./dist && rm -rf ./dist/* && npm run build-cjs && tsc && npm run cp-css && npm run build-tonic && npm run build-bin", + "build": "mkdir -p ./dist && rm -rf ./dist/* && npm run build-cjs && tsc --project tsconfig.build.json && npm run cp-css && npm run build-tonic && npm run build-bin", "build-tonic": "cp ./src/cloudinary/tonic.js ./dist/cloudinary && cp ./src/tonic.js ./dist", "cp-css": "cp ./src/*.css ./dist", "preversion": "npm run lint", diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..cfbd238 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "exclude": [ + "example", + "test" + ] +}