beta.46 Design, ⚐ Flags, div, fixed notify
Design/theme
Put a lot of work into tightening up pixels and made progress towards custom themes:
Here's a silly demo of me playing with theme generation:
Flags ⚐
An astute observer would notice that the Edit
and Share
tabs are now gone. They've been consolidated into a "flag menu".
When you press the right
key from the main menu of script, the flag menu now opens up. This shows the selected script and gives you some options. It also exposes the keyboard shortcuts associated with those options that you can use to :
I've found I use cmd+o
and cmd+n
all the time to tweak scripts of quickly create a new one to play around with.
Custom Flags
You can pass your own custom flags like so:
Notice that flag
is a global while flags
is an object you pass to arg
. This is to help keep it consistent with terminal usage:
From the terminal
Will set the global flag.open
to true
You could also run this and pass in all the args:
In the app, you could create a second script to pass flags to the first with. This is required if you need to pass multiple flags since the arg
helper can only "submit" one per arg
.
I'll put together some more demos soon. There are plenty of existing CLI tools out there using flags heavily, so lots of inspiration to pull from.
await div()
There's a new div
"component". You can pass in arbitrary HTML. This works well with the md()
helper which generates html
from markdown.
Fixed notify
notify
is now fixed so that it doesn't open a prompt
The most basic usage is:
notify
leverages https://www.npmjs.com/package/node-notifier
So the entire API should be available. Here's an example of using the "type inside a notification":