Open vdakalov opened 2 years ago
Yeah - if you plan to use Typescript. Just be vary that this is currently not versioned (meaning It's kinda following the latest Cinnamon version, so if you target 3.8 etc there might be differences).
Examples (published applets) of how you can use it: https://github.com/linuxmint/cinnamon-spices-applets/tree/master/radio%40driglu4it https://github.com/linuxmint/cinnamon-spices-applets/tree/master/weather%40mockturtl
@vdakalov you can also use this repo as a template: https://github.com/jonath92/cinnamon-template-applet. The repo is not perfect but AFAICs it is the easiest way to setup an applet in typescript - just follow the steps in the readme - and you should have a very basic working applet.
@jonath92 thank you for share but I'm already develop one for me. I published it in my repo just now. So you can check it out too if you want ;)
Cool looks interesting. I am very glad to see someone new using the types as Gr3q and also myself have spend a lot of time in the types. There are imo not perfect but really good.
Yes guys, you did really a lot of good work. Thank you for these types. It will be great to make something useful for the project and I will if find any free time. For now I can say my suggestions to improve it, if you don't mind
import "@ci-types/cjs";
in code to use these types, but it's not convenient. It would be better to add types in tsconfig.json
(e.g. compilerOptions.types: ["@ci-types/cjs"]
). This way works fine for me.require
function, for example.imports.applets
and imports.appletManager
. This is due to differences between cinnamon versions or it just hasn't been done yet?cinnamon
folder, they are manually typed, so someone needs to go through the JS files and diff them for each version I guess. This is also fine, but as said, it takes time that I don't have atm.cinnamon
version because they are either incomplete, outdated, I was not able to discern the types for them or just plain impossible to know the types before runtime (see AppletImports
in imports.applets
)
I'm new in dev under Cinnamon, but it is looks like it is what I needed when dev my own applets. I'm right?