Skip to content

Commit

Permalink
Fix #405 - Dedicated output directories for ESM and CJS builds. (#406)
Browse files Browse the repository at this point in the history
# Describe Request

As mentioned in the issue #405, the ESM and CJS builds are overwriting
each other. This change uses different output directories for both.

Fixed #405 

# Change Type

Bug fix.
  • Loading branch information
cinar authored Jan 15, 2024
1 parent 8f14d6a commit bb3146b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"name": "indicatorts",
"version": "1.0.16",
"description": "Stock technical indicators and strategies in TypeScript for browser and server programs.",
"main": "dist/index.js",
"module": "dist/index.es.js",
"types": "dist/index.d.ts",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/types/index.d.ts",
"files": [
"/dist"
],
"scripts": {
"build": "npm run build-esm; npm run build-cjs; npm run build-types",
"build-esm": "esbuild src/index.ts --bundle --outdir=dist --platform=browser --format=esm --minify --sourcemap",
"build-cjs": "esbuild src/index.ts --bundle --outdir=dist --platform=node --format=cjs --minify --sourcemap",
"build-types": "tsc --emitDeclarationOnly --declaration --outDir dist",
"build-esm": "esbuild src/index.ts --bundle --outdir=dist/esm --platform=browser --format=esm --minify --sourcemap",
"build-cjs": "esbuild src/index.ts --bundle --outdir=dist/cjs --platform=node --format=cjs --minify --sourcemap",
"build-types": "tsc --emitDeclarationOnly --declaration --outDir dist/types",
"lint": "eslint --ignore-path .gitignore .",
"fix": "prettier --ignore-path .gitignore --write . ; eslint --fix --ext .ts src",
"test": "jest"
Expand Down

0 comments on commit bb3146b

Please sign in to comment.