You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deno is a secure TypeScript runtime written in rust.
I propose that typescript code blocks use Deno to execute.
It handles dependency fetching and compiling TypeScript to JavaScript automatically. This means a maskfile.md can be self contained, there is no need to run an npm install to make the JavaScript blocks function.
Because Deno requires permission flags to operate, there would need to be a way to provide permission arguments to the deno run invocation.
The text was updated successfully, but these errors were encountered:
Brilliant... assigning ts/typescript lang code to deno definitely makes sense to me with the current state of things. I was wondering how to add deno support, and this solves it 👍
Regarding deno permission args, I'm open to suggestions. Perhaps the first line of the codeblock could define which args to pass.. as a comment to keep it simple.
## deno_cmd~~~ts// --allow-read --allow-write etc...console.log('this is denoooo');
~~~
Yes. Deno permissions are hard. For ref here is how you can do it with a shebang. It looks rather ugly because -S isn't supported well outside macOS.
One thing I've been doing with my deno files is adding file-level JSDoc comments for copyright, author, description. I then parse that to generate my README.md. I've considered adding denoargs in there but abandoned that idea as it is not JSDoc standard.
That line would have to be within the top 5 lines of the code block. A string may be better than an array, but ideally it would also be parsable as YAML for other tools. With explicit allow reads etc it would need to handle multiple lines:
// run: >// --allow-read=/a/very/long------path/project/foo// --allow-write=/a/very/long------path/project/fooconsole.log('this is denoooo')
When you need multiple lines though, array syntax is easier to manage to my eye.
Deno is a secure TypeScript runtime written in rust.
I propose that typescript code blocks use Deno to execute.
It handles dependency fetching and compiling TypeScript to JavaScript automatically. This means a maskfile.md can be self contained, there is no need to run an
npm install
to make the JavaScript blocks function.Because Deno requires permission flags to operate, there would need to be a way to provide permission arguments to the
deno run
invocation.The text was updated successfully, but these errors were encountered: