Skip to main content

Scaffold an extension

You're ready to create a new extension. You want to set up your development environment so you can start coding.

In this tutorial, you create an extension that adds a calculation to the Elfsquad quotation page. You'll generate starter code and use the Elfsquad CLI to develop the extension.

Requirements


Create a new extension

You can create a new Elfsquad extension using the Elfsquad CLI.

  1. Navigate to the directory where you want to create the extension. The extension will be scaffolded in a new subdirectory.
  2. Run the following command to initialize a new extensions:
elfsquad extension init <name> --template action
  1. Navigate to the extension and use your package manager of choice to install the required dependencies:
cd <name>
npm i
  1. Build the extension
npm run build