Actions are functions available in preset files. They are a layer of abstraction for diverse kind of manipulations, such as copies, editions, deletions, package installations, and more.
They are the key concept of Preset: easy to use, powerful enough to make almost any kind of preset.
Actions are globally avaiable in a preset file. Typings are provided by default if you used
preset init, so you can benefit from IDE autocompletion. Every action is a single asynchronous function call with a single object parameter. Every object parameter accepts a
title property that changes the text displayed in the console for the corresponding action when applying the preset.
The following actions are implemented.
|Extract templates||Extracts file from the preset's template directory|
|Install packages||Installs Node or PHP packages|
|Execute command||Executes shell commands in the target directory|
|Edit files||Performs file manipulations on the selected files|
|Rename paths||Renames files or directories|
|Delete paths||Deletes files or directories|
|Apply nested presets||Applies another preset|
|Group||Groups multiple actions together|
|Prompt (experimental)||Asks for user input|