v0.0.0 is available. Check it out now 🚀
docs

Bank

Bank is a declaration that allows you to define a custom samples collection for your Devalang application.

It is a powerful feature that enables you to create a structured and reusable set of samples that can be referenced throughout your scripts.

Installing a bank will download the samples and effects from our bank manager server and make them available in your Devalang project.

Installed banks are available at the following path <project-root>/.deva/bank/<bank-author>.<bank-name>.

Install a bank

To install a bank, use the generic install command with the bank type. This downloads the specified bank and makes it available locally.

Remove a bank

To remove a bank, you can use the bank command with the remove option in the Devalang CLI. This command will delete the specified bank from your application.

Update a bank

To update a bank, you can use the bank command with the update option in the Devalang CLI. This command will update the specified bank with the latest changes.

You can update all banks at once or a specific bank by providing its name :

Updating a specific bank :

List distant banks

To list all the banks that are available for your Devalang application, you can use the bank command with the available option. This will display a list of all the banks that are on our bank manager server.

List installed banks

To list all the banks that are currently installed in your Devalang project, you can use the bank command with the list option. This will display a list of all the banks that are installed in your project.

Creating a bank

To create a bank, you need to follow these steps:

  1. Install devaforge if you haven’t already.
  2. Use the devaforge create bank command to create a new bank.
  3. Follow the prompts to configure your bank.

Bank triggers

Declare a bank in your script to enable its triggers. You can now use namespaced author and optional aliasing:

  • bank <author>.<name>
  • bank <author>.<name> as <alias>

Once declared, use namespaced triggers with either the bank name or the alias: .<alias>.<trigger-name>.

Examples:

unknown.txt

Examples

unknown.txt