diff --git a/CHANGELOG.md b/CHANGELOG.md index 2618a4bd..f75bdf09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ - Added `setup()` method for `upload` extension to specify custom settings - Added `#.actions.uploadFile.dragdrop` to indicate drag&drop file supported or not (provided by `upload` extension) - Added `embed` extension to provide a communication with a host in case when an app is loaded into iframe -- Added `dist/discovery-embed-host.js` a ESM module which provides an API to communicate with an app loaded into a sandbox (iframe) +- Added `dist/discovery-embed-host.js` into package, a ESM module which provides an API to communicate with an app loaded into a sandbox (iframe) - Added `embed` support for preloader - Tweaked nested list styles in `markdown` view - Fixed applying twice the extensions passed via `App`'s options diff --git a/dist/.npmignore b/dist/.npmignore index 5c2d5a3f..8add8545 100644 --- a/dist/.npmignore +++ b/dist/.npmignore @@ -1,4 +1,5 @@ * +!discovery-embed-host.js !discovery-preloader.css !discovery-preloader.js # !discovery-preloader.js.map diff --git a/package.json b/package.json index dea27242..461ea245 100644 --- a/package.json +++ b/package.json @@ -12,12 +12,12 @@ "jsdelivr": "dist/discovery.js", "scripts": { "lint": "eslint cypress models src", - "build": "npm run build:js && npm run build:css && npm run build:preloader", - "build:js": "esbuild src/lib.js --outfile=dist/discovery.js --bundle --define:global=window --format=esm --minify --sourcemap", + "build": "npm run build:js && npm run build:css && npm run build:preloader && npm run build:embed-host", + "build:js": "esbuild src/lib.js --outfile=dist/discovery.js --bundle --define:global=window --format=esm --minify --sourcemap=external", "build:css": "esbuild src/lib.css --outfile=dist/discovery.css --bundle --minify --loader:.svg=dataurl", - "build:embed-host": "esbuild src/extensions/embed-host.js --outfile=dist/discovery-embed-host.js --bundle --define:global=window --format=esm --sourcemap=inline", + "build:embed-host": "esbuild src/extensions/embed-host.js --outfile=dist/discovery-embed-host.js --bundle --define:global=window --format=esm --minify --sourcemap=external", "build:preloader": "npm run build:preloader:js && npm run build:preloader:css", - "build:preloader:js": "esbuild src/preloader.js --outfile=dist/discovery-preloader.js --bundle --define:global=window --format=esm --minify --sourcemap", + "build:preloader:js": "esbuild src/preloader.js --outfile=dist/discovery-preloader.js --bundle --define:global=window --format=esm --minify --sourcemap=external", "build:preloader:css": "esbuild src/preloader.css --outfile=dist/discovery-preloader.css --bundle --minify --loader:.svg=dataurl", "build-gh-pages": "discovery-build -o .gh-pages --clean", "prepublishOnly": "node scripts/bake-version.cjs && npm run build",