zendesk / zendesk_app_migrator

CLI tool to assist in migrating v1 App Framework apps to v2
Other
10 stars 5 forks source link

Refactor App Migrator to Typescript #2

Closed svizzari closed 7 years ago

svizzari commented 7 years ago

✌️

Description

Instead of using a bunch of libraries for async behaviour, use ES* features transpiled by way of Babel + Webpack + Typescript. The latter isn't strictly necessary, but types are cool. I found that just using Typescript is a good approach. The TS compiler supports everything we need for async control flow, including the new for await (const thing of _iterable_) .... The build pipeline has been rebuilt so that the emit of the package would include Typescript type declarations alongside JS code. This would allow any potential consumer of the package to leverage types, if using TS themselves. To achieve the former, I moved all source and tests to the new src directory, and made lib, and lib/test the new build artefacts. Testing can now be done by running something like (if ts-node and typescript are globally installed) ts-node src/index.ts migrate --path ~/Code/zendesk/demo_apps/basic_ticket_sample_app.

References

This PR implements:

This PR also:

migrate

TODO

svizzari commented 7 years ago

@zendesk/vegemite 💇 This PR is now ready for some reviews. I'll be going through and annotating some of the code with comments of my own to help explain decisions/implementation

svizzari commented 7 years ago

@zendesk/vegemite 💇

I've addressed all the comments we made during the walkthrough