IOT-Map-Component
IOT-Map-Component copied to clipboard
fix(build): library build refactoring
Fixes https://github.com/Orange-OpenSource/IOT-Map-Component/issues/18 FIxes https://github.com/Orange-OpenSource/IOT-Map-Component/issues/100
- [x] Package this fix in
iotmapmanager-labs - [ ] Test
iotmapmanager-labsin the root project - [ ] Test
iotmapmanager-labsin a real Orange Angular project - [ ] Check if other packages should be defined as
peerDependencies(@types/leaflet,@types/leaflet.markercluster,leaflet-polylineoffsetandleaflet.markercluster) - [ ] Study exactly where the
Bounds are not validissue comes from - [x] Finish the work to migrate to Node 16 while we are testing it in a real project
- [ ] Fix the test project to embed resources in
angular.jsonand not inindex.html - [ ] Before merging it, remove modification in
component.ts
What's been done regarding Node 16
We observed some issues while building the library with Node 14 so I embedded this modification as well in this PR:
- Run
npm iwith Node 16 insrc/iotMapManagerto updatepackage-lock.json - Run
npm iwith Node 16 at the root of the project to updatepackage-lock.json - Updated
.github/workflows/docs.ymlto use latest versions ofactions(v3) and use Node 16 (+ cache)- [x] Run it via https://github.com/Orange-OpenSource/IOT-Map-Component/runs/6190089824?check_suite_focus=true and Storybook was well deployed
How to test it locally / manually
- Run
npm iat the root of the project - Go to
src/iotMapmanagerand then runnpm i - Run
npm pack - Go to
/tmpand runrm -rf iotmap* package ; cp /Users/ju/IOT-Map-Component/src/iotMapManager/iotmapmanager-2.6.8.tgz . ; tar -xvf iotmapmanager-2.6.8.tgz ; rm -rf /Users/ju/IOT-Map-Component/node_modules/iotmapmanager/* ; cp -R package/* /Users/ju/IOT-Map-Component/node_modules/iotmapmanager/ - Go back to the root of this branch and run
npm run start
How to test it with the iotmapmanager-labs
TODO
Some notes for triage
- in
src/iotMapManager/package-lock.jsonleaflet version is 1.7.1 - Need to regenerate
package-lock.jsonfrom scratch to handle correctly the leaflet versions?
This PR would need to be updated to reflect the new architecture. But the principle is probably still valid and relevant.