Skip to content

Commit

Permalink
better build script
Browse files Browse the repository at this point in the history
  • Loading branch information
nichoth committed Dec 10, 2023
1 parent a9859f1 commit f0787dc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"exclude": [
"example",
"test"
]
}

0 comments on commit f0787dc

Please sign in to comment.