Could a similar result be achieved by having a set of implicit imports in a users home config and executing the content in an async, then you can just await values.
It would also be worthwhile to use a different file extension, like .tmj/.tmt (for js and typescript flavours).
Hmm, could you explain your exports idea further? I don't think I'm getting it.
The different extensions are a good idea; my current recommendation is to use .lem.js (for compatibility with editors), so that could be changed to .lem.ts easily!
I'd love to have proper TypeScript support at some point, too.
Well looking at the left (Tasklemon) and right (Node.js) in the example, I'm wondering what it take to make them be the same thing. Off the top of my head something like:
#!/usr/local/bin/tasklemon stdlib
home.children().forEach(child => {
if (child.extension === 'tmp') child.delete();
});
where 'stdlib' in a tasklemon config dir has the preamble:
So basically each 'feature' of Tasklemon is just a nice DSL for js/ts.
And for handing async callbacks, run the contents of the script in an async function so you can await values anywhere rather than have to pass in callbacks.
I'm not sure what your point is; of course, you can write JS on top of Node that exposes its functionality with a nice API: that's exactly what Tasklemon is!
Did the intro maybe give you the impression that TL was built standalone, instead of on Node?
It would also be worthwhile to use a different file extension, like .tmj/.tmt (for js and typescript flavours).