build: remove minify and optimization for drawtools and geosearch #1065
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implemented changes
This PR attempts to align our monorepo with Lit's best practices for publishing packages (https://lit.dev/docs/tools/publishing/#don't-bundle-minify-or-optimize-modules)
Todo: (many things in progress)
don't minify/optimize/obfuscate code (parent application should be responsible for this)don't bundle src files in a single file (so that parent application can optimize it on their side)src
folder without any vite bundling/optimization etc (2d84ab1)eox-drawtools
andeox-geosearch
) use stylings from the root elements repo (e.g. https://github.com/EOX-A/EOxElements/blob/main/elements/drawtools/src/components/controller.js#L3), this obviously breaks when trying to use the package in an app as the styles themselves aren't in thesrc
folder, potential solution would be to only use styles from inside thesrc
folder (e.g. https://github.com/EOX-A/EOxElements/blob/main/elements/geosearch/src/main.js#L7) or, for styles/utils that get re-used across our components create a new package (eox/styles
) so we can import them as a dependency (fixed in cfdb001)Closes Element publishing improvements #747
How to run
eox-drawtools
andeox-geosearch
cd elements/drawtools
npm pack
(this will create a tar of the package)cd ~/path-to-test-project
npm install ~/path-to-elements-repo/elements/drawtools/eox-drawtools-0.8.1.tgz
Screenshots/Videos
Checklist before requesting a review