Write JXA using typescript π!
Freely use ES features which typescript supports and provide nice basic development experience.
Thanks to JXA-Cookbook.
It's OS X automation, using Javascript.
Since OS X 10.10 (Yosemite), Javascript (called Javascript for Automation, or JXA) is also supported for app automation. This is great news, especially for Javascript developers who want to automate workflows on their Mac.
But by default, JXA only provides some primitive functionalities for development. For example, if you what to modularizing your code, the only way is Using Script Library which is apple officially recommended but it's cumbersome. And, you can't use any of your favorite node modules like lodash.
So, ts-jxa was born, aiming to make building JXA application more efficient and elegant.
ts-jxa is a development tool for building JXA program.
It let you use a lot of typescript features like arrow function/const && let/promise and most importantly, static type check.
And it gives you a nice development experience by auto rebuild, elegant output, and compression for production.
yarn add ts-jxa
or npm i ts-jxa
If you want to install it globally, you can add global flag as follows:
yarn global add ts-jxa
or npm i -g ts-jxa