Quick Orientation #131
johnlindquist
started this conversation in
General
Replies: 2 comments 3 replies
-
How can you get other node native packages? Such as |
Beta Was this translation helpful? Give feedback.
2 replies
-
@johnlindquist can you please update the link in "2. Global Helper Functions" ? It currently leads to 404 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For people new to Script Kit, here's a tl;dr
1.
arg
Pauses the script and prompts for inputSimplest possible
arg
:Most commonly, you'll pass in a
placeholder
andchoices
Using a
placeholder
andchoices
:Customizing choice values:
Choice Functions
Beyond that, a function that returns an Array like above also works.
If you want to generate choices when you type (instead of the default filter behavior), then pass
input
into the functionGenerating choices also handles "searching" where you can pass input to apis and return results. These functions can be
async
as well, so many of the helpers such asawait get
to query apis would work inside the function.2. Global 3rd Party Functions
There's a sizeable list of global functions available that alias popular npm packages for common tasks:
get
,copy
,replace
,md
, etc. Check out the @johnlindquist/globalslib to see most of the 3rd party helper functions available.
3.
npm
The
npm
helper will prompt the user to install a package the first time they run the script:4. Lots more
You can add tabs, a database, previews, drag/drop, and more, but I would say the majority of scripts are a combination of the ideas above.
I'm happy to answer any questions. Happy Scripting! - John
Beta Was this translation helpful? Give feedback.
All reactions