From 72cc5977f9798e448cca2fe0a0c44d2030f0d3ca Mon Sep 17 00:00:00 2001 From: Michael Shang Date: Thu, 9 Mar 2023 16:36:39 +1100 Subject: [PATCH 1/6] using prepare again --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4227255a..5fcbfe39 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "info": "npm info react-stockcharts", "sourcemap:visualize": "source-map-explorer build/dist/react-stockcharts.min.js build/dist/react-stockcharts.min.js.map", "server": "cd build && python3 -m http.server 8090", - "postinstall": "npm run release" + "prepare": "npm run release" }, "dependencies": { "d3-array": "^1.2.1", From 70d8a17a8cedf3e907445d6dddbe1552769f26c3 Mon Sep 17 00:00:00 2001 From: Michael Shang Date: Thu, 9 Mar 2023 17:07:07 +1100 Subject: [PATCH 2/6] added .npmignore --- .npmignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..e69de29b From f042a170bad9acb2f14fe0562a9aa53ded5771f2 Mon Sep 17 00:00:00 2001 From: Michael Shang Date: Thu, 9 Mar 2023 17:52:42 +1100 Subject: [PATCH 3/6] testing build/index.js as main and removed release.js --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5fcbfe39..46eb6d8f 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "name": "react-stockcharts", "version": "0.7.8", "description": "Highly customizable stock charts with ReactJS and d3", - "main": "src/index.js", - "module": "src/index.js", + "main": "build/index.js", + "module": "build/index.js", "author": { "name": "Ragu Ramaswamy" }, @@ -21,7 +21,7 @@ "babel:es:watch": "npm run babel:es -- -watch", "babel:cjs": "cross-env BABEL_ENV=cjs babel src --out-dir build --source-maps", "babel:es": "cross-env BABEL_ENV=es babel src --out-dir build/es --source-maps", - "release": "npm run clean && npm run babel:cjs && npm run babel:es && cp README.md build/ && node scripts/release.js", + "release": "npm run clean && npm run babel:cjs && npm run babel:es && cp README.md build/", "lint": "eslint --ext .js,.jsx src --fix", "upgrade:patch": "npm version patch", "preversion": "npm run lint", From b00e313cf35b3ff189b370dd5322a6b70d1ec014 Mon Sep 17 00:00:00 2001 From: Michael Shang Date: Thu, 9 Mar 2023 18:00:53 +1100 Subject: [PATCH 4/6] Revert "testing build/index.js as main and removed release.js" This reverts commit f042a170bad9acb2f14fe0562a9aa53ded5771f2. --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 46eb6d8f..5fcbfe39 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "name": "react-stockcharts", "version": "0.7.8", "description": "Highly customizable stock charts with ReactJS and d3", - "main": "build/index.js", - "module": "build/index.js", + "main": "src/index.js", + "module": "src/index.js", "author": { "name": "Ragu Ramaswamy" }, @@ -21,7 +21,7 @@ "babel:es:watch": "npm run babel:es -- -watch", "babel:cjs": "cross-env BABEL_ENV=cjs babel src --out-dir build --source-maps", "babel:es": "cross-env BABEL_ENV=es babel src --out-dir build/es --source-maps", - "release": "npm run clean && npm run babel:cjs && npm run babel:es && cp README.md build/", + "release": "npm run clean && npm run babel:cjs && npm run babel:es && cp README.md build/ && node scripts/release.js", "lint": "eslint --ext .js,.jsx src --fix", "upgrade:patch": "npm version patch", "preversion": "npm run lint", From 6232784c482d3e91b11a3bda54d84e1c6ab8bbaf Mon Sep 17 00:00:00 2001 From: Michael Shang Date: Thu, 9 Mar 2023 18:03:12 +1100 Subject: [PATCH 5/6] try out exports from package.json --- package.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 5fcbfe39..8827af23 100644 --- a/package.json +++ b/package.json @@ -144,5 +144,11 @@ "name": "rrag", "email": "ragunath.ramaswamy@gmail.com" } - ] + ], + "exports": { + "import": "./build/index.js", + "require": "./build/index.js", + "default": "./build/index.js" + } + } From 7010ce84e0754733fd94edafee12abc88e634039 Mon Sep 17 00:00:00 2001 From: Michael Shang Date: Thu, 9 Mar 2023 18:09:10 +1100 Subject: [PATCH 6/6] trying exports ./build/index.js --- package.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/package.json b/package.json index 8827af23..f6fa4fe0 100644 --- a/package.json +++ b/package.json @@ -146,9 +146,7 @@ } ], "exports": { - "import": "./build/index.js", - "require": "./build/index.js", - "default": "./build/index.js" + ".": "./build/index.js" } }