Gr3q / types-cjs

Typescript declarations for CJS - Cinnamon JavaScript
MIT License
5 stars 2 forks source link

update __meta and add github action #9

Closed jonath92 closed 2 years ago

jonath92 commented 2 years ago

This basically just adds the types I need for an open pr for the radio (I want to overwrite __meta and my last pr was not fully right). Additionally I added a github action for publishing automatically each type changes are made on the main branch. When you don't like it, then I remove it but I thought it might be helpful. For the action you have to set the NPM_TOKEN env variable in github: image

You can get the token by running npm token create in the terminal. The password you are asked for is the same as you us for npmjs.com and you should receive the one time password (otp) by mail.

Gr3q commented 2 years ago

Cheers, I was too lazy to set it up, tbh I should have.

Just a question, is __meta injected in for every applet/desklet/extension?

jonath92 commented 2 years ago

Just a question, is __meta injected in for every applet/desklet/extension?

It is definitely injected for every applet and I think also for every extension and desklet but I am not sure about that.

imo __meta is pretty useful because you have access to the uuid from everywhere in the code. For the radio I now added additionally the instanceId and the orientation to __meta in the applet.js file. That's why I had to create a Meta type which I can overwrite in my applet.