gilsdav / ngx-translate-router

Translate routes using ngx-translate
130 stars 44 forks source link

Standardize library, releases and processes #69

Open rafa-suagu opened 4 years ago

rafa-suagu commented 4 years ago

I think that several files and processes should be added to make this library stronger and standard.

I can do some of these actions because I did it in other libraries.

gilsdav commented 4 years ago

Thank you for your investment!

Indeed, this is something that will have to be implemented fairly quickly.

I plan to set up an automatic build via azure-devops so that it:

Do you usually use github actions, travis or other CI-CD tools? Or are you familiar with azure-devops ?

We should also add badges https://badge.fury.io

I also started to setup unit tests but I did not find enough time to continue them.

gilsdav commented 4 years ago

I started with https://github.com/gilsdav/ngx-translate-router/tree/add-legacy-unit-tests I will probably use Github actions for CI-CD part.

rafa-suagu commented 4 years ago

Sorry @gilsdav I left this comment as a draft on the mobile app.

Sure, I used Travis and CircleCI. I never used GitHub Actions but I read about it and seems pretty simple to implement and efficient, I agree with you we can use it.

I think that with a little work I can replicate the scenario that I did on some other libraries with the following features:

What do you think?

gilsdav commented 4 years ago

Looks great :)

For github action it looks simple as https://github.community/t/npm-test-jasmine/17870

rafa-suagu commented 4 years ago

Looks great :)

  • "GitHub releases": possible to do it only on tag creation ? (add changelog to automatically created release)

For sure, the GitHub release it's a manual process that is very simple with some tools. The same for the changelog, that is only generated in the release process.

  • "New package.json scripts": we can now run "npm start", "npm test", "npm run build", what to you mean by "easier and standard" ?

Create several new scripts with watchers (tests for example), separate the two libraries, and the demo.

  • "to avoid misconfigurations" Did you find some ?

I did not check yet but I did the same operation in two other libraries and I found several differences between a library created from scratch by the last version of Angular CLI (angular.json, tsconfigs, etc...). The process it's pretty simple, just create the Angular CLI workspace, create the two libraries and the demo app and copy the actual code.

Every time that I need to update some libraries or apps I follow this process to get the new features and prevent the differences.

gilsdav commented 4 years ago

First version of PR pipeline: https://github.com/gilsdav/ngx-translate-router/pull/80/files#diff-e115b04ed1692a2ad3f39021f1b3ec20