-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade JS dependencies #102
Conversation
Define packags needed in package.json, add a command to copy the distribution files to the js/vendor/ folder in gulpfile.js and then it's just a matter of doing: 1. Updating version numbers in `package.json` 2. Running `npm run update-libs`
But just the distribution files
spin.js==2.3.2 and jszip==2.6.0 need to be pinned to these versions otherwise we need to upgrade shp2geojson (which seems unmaintained)
Just use a bash script to copy the distribution files from the node modules folder to the vendor one, which was essetially what gulp was doing. Store all files at the library root level (no dist/ or src/ folders)
@u10313335 @EricSoroos it would be great if you could tests if these updates break something on your end. |
@EricSoroos forgot to say that I incorporated the Derilinx fork of ol-helpers ( |
Thanks @amercader. I will test the Shapefile viewer in the following weeks. My colleague creates the shp2geojson. But unfortunately he had left our team many years ago. Hence, I would recommend to pin the dependencies to old versions. |
Hi @amercader, I have tested the Shapefile and WMTS viewer.
|
Thanks @u10313335 works great, merging now and doing a new release. |
This upgrades all the JS libraries to the latest version.
@EricSoroos I decided to go for a better approach than what we were doing up until now.
package.json
file lists the libraries we use (at least those which have npm packages).npm install
and thennpm run update-libs
. This copies just the distribution files to our js/vendor file, each library to its own folder.The following libraries are managed manually as they don't have npm packages:
spin.js==2.3.2 and jszip==2.6.0 need to be pinned to old versions otherwise we need to upgrade shp2geojson (which seems unmaintained)
ol-helpers is a difficult one. If you are planning on using it perhaps it would make sense to publish it properly as an npm package, or alternatively we could port the bits we need to this extension