From afb5366dd7ce07443e27f72f53ada98f3db3d0c2 Mon Sep 17 00:00:00 2001 From: Bogdan Bodnar Date: Wed, 8 Jan 2020 09:38:02 +0100 Subject: [PATCH] Fix main js path in unpacked library. --- package.json | 2 +- scripts/collect_files.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8f4bb14..c5fdbf0 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "reforis" ], "license": "GPL-3.0", - "main": "./index.js", + "main": "./src/index.js", "dependencies": { "axios": "^0.19.0", "jest-transform-css": "^2.0.0", diff --git a/scripts/collect_files.sh b/scripts/collect_files.sh index 2ea7534..c2e1645 100644 --- a/scripts/collect_files.sh +++ b/scripts/collect_files.sh @@ -4,7 +4,10 @@ mkdir -p dist cp -rf ./src/* dist cp package.json package-lock.json README.md dist +sed -i 's/\/src//g' dist/package.json # remove ./src from main js file path + cp -rf translations dist + # Remove unwanted files rm -rf dist/**/__tests__ rm -rf dist/__mocks__