angular-esri-components
angular-esri-components copied to clipboard
ng-packagr
Migrate Library to the ng-packagr Format
The following wiki describes how to do this with the angular-cli:
https://github.com/angular/angular-cli/wiki/stories-create-library
Requirements
- [x] Upgrade to v6 of the angular-cli and migrate existing library files to the new structure
- [x] Create an example app that uses the library
- [x] Add NPM scripts for managing the library
- [x] Build
- [x] Test
- [x] Update the
package.jsonnew library with the current version of the library - [x] Update the CHANGELOG.md with notes about the changes
- [x] Test in existing applications
- [ ] Update README.md in root of the project with information about the project
@JordeyWijnbergen @slackinator @rrdlpl
I have created a branch for moving this library over to using ng-packagr. The branch can be found at https://github.com/TheKeithStewart/angular-esri-components/tree/ng-packagr. Since you all have contributed to this library I'd like to get feedback from you about the new structure.
Some things to note:
- the project now contains an application that is using the
angular-esri-componentslibrary and can be used as an example application - you can run the example application by executing the following:
npm install
npm run build
npm start
This installs dependencies, builds the library, and runs the application that is using the library.
- the library itself is now located in the
projects/angular-esri-componentsfolder
Please take a look at the branch and let me know what you think.
@JordeyWijnbergen @slackinator @rrdlpl
I believe that I have all of the substantial changes done on the library for the new structure and for the upgrade to Angular v6. I have tested it out in a couple of apps that I have that are using the library and it seems to work well. If possible I'd like to test it in other apps that you guys are using.
If you have the time could you please try it out in your applications as well? You can install it by doing the following:
- checkout the latest from the following branch: https://github.com/TheKeithStewart/angular-esri-components/tree/ng-packagr
- from the root of the library directory execute the following commands:
npm install
npm run build
cd dist/angular-esri-components
npm pack
- install the tarball that was generated from the
npm packin your project
As mentioned above this version of the library is dependent on Angular v6. With that in mind you will need to upgrade your project to version 6 of Angular as well. If you need some info about that upgrade take a look at the following article https://dev.to/chiangs/upgrading-to-angular-6-309p. There are a few breaking changes in this version of Angular but using ng update makes it so easy to do!
One other note, in this update of the library the angular-esri-loader module has been removed. If you were using this in your projects you can replace it with EsriModuleProvider that is provide by this library.
Let me know if you need any help with this. I really appreciate you any help you can give!
Hi Keith,
Im planning to work on it tomorrow!
Kind regards Jordey
Verzonden vanaf mijn Windows 10-telefoon
Van: Keith Stewart [email protected] Verzonden: Wednesday, May 9, 2018 3:11:56 AM Aan: TheKeithStewart/angular-esri-components CC: Jordey Wijnbergen; Mention Onderwerp: Re: [TheKeithStewart/angular-esri-components] ng-packagr (#26)
@JordeyWijnbergenhttps://github.com/JordeyWijnbergen @slackinatorhttps://github.com/slackinator @rrdlplhttps://github.com/rrdlpl
I believe that I have all of the substantial changes done on the library for the new structure and for the upgrade to Angular v6. I have tested it out in a couple of apps that I have that are using the library and it seems to work well. If possible I'd like to test it in other apps that you guys are using.
If you have the time could you please try it out in your applications as well? You can install it by doing the following:
- checkout the latest from the following branch: https://github.com/TheKeithStewart/angular-esri-components/tree/ng-packagr
- from the root of the library directory execute the following commands:
npm install npm run build cd dist/angular-esri-components npm pack
- install the tarball that was generated from the npm pack in your project
As mentioned above this version of the library is dependent on Angular v6. With that in mind you will need to upgrade your project to version 6 of Angular as well. If you need some info about that upgrade take a look at the following article https://dev.to/chiangs/upgrading-to-angular-6-309p. There are a few breaking changes in this version of Angular but using ng update makes it so easy to do!
One other note, in this update of the library the angular-esri-loader module has been removed. If you were using this in your projects you can replace it with EsriModuleProvider that is provide by this library.
Let me know if you need any help with this. I really appreciate you any help you can give!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/TheKeithStewart/angular-esri-components/issues/26#issuecomment-387589441, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AhucPr_f4epU-EOpqfjhFqN3kCZJjfSdks5twkJcgaJpZM4Sl0kB.
I just fixed an issue where the LayersToggleComponent was not getting exported and therefore wasn't available in the consuming apps. If you have already started testing the library please pull down the latest.
I was able to get the run build command to work and brought the updated version into the project. Needed to fix ElementRef in EsriMapService for it to work in my project. I also recreated the minimal updates to allow developers to specify a different view type. (Need SceneView for a certain project)
Will create a PR with my changes momentarily.
Thanks, @slackinator! I have successfully tested and have merged in your change. Thanks for trying it out and catching those issues!
Hi @TheKeithStewart ,
Thanks nice work. It works great with my code!
I ran into a breaking change with ArcGIS JavaScript 4.7 typings. The typing for the Search widget is renamed from Search into widgetsSearch. And the Search typing is changed into the web scene version.
Please let me know if there is a particular thing you would like me to test.
Kind regards,
Jordey
That is great, @JordeyWijnbergen! Thanks for giving it a look.
Nothing in particular I wanted you to test other than installing it in your application does not break anything.
I'm going to put a bit more detail in the change log and update the readme and then I will cut a release. Probably won't be until early next week though.
@TheKeithStewart Is there anything you need help on to get this closer to completion?
Thanks for the offer, @slackinator! I'm working on it this weekend and hoping to cut the release. If I'm not able to get it completed then I will let you know what I could use some help with.
@JordeyWijnbergen @slackinator
I have published version 2 of this library! I have not closed this Issue yet because I still need to update the root README appropriately and I think that there is an issue with where the library README links are pointing for what is published to npm. I'll get those fixed up soon.
Thanks for your help on this guys!!!
Great! Thank you!
Jordey
Van: Keith Stewart [email protected] Verzonden: zaterdag 2 juni 2018 13:24 Aan: TheKeithStewart/angular-esri-components CC: Jordey Wijnbergen; Mention Onderwerp: Re: [TheKeithStewart/angular-esri-components] ng-packagr (#26)
@JordeyWijnbergenhttps://github.com/JordeyWijnbergen @slackinatorhttps://github.com/slackinator
I have published version 2 of this library! I have not closed this Issue yet because I still need to update the root README appropriately and I think that there is an issue with where the library README links are pointing for what is published to npm. I'll get those fixed up soon.
Thanks for your help on this guys!!!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/TheKeithStewart/angular-esri-components/issues/26#issuecomment-394079919, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AhucPhuoguEmmYh_45aJPhk0zkbhvkh_ks5t4nX2gaJpZM4Sl0kB.