A Baseline Extension is a set of files, installed locally in your extension development directory. You use these files as a basis to build any extension for your Commerce web store or SCIS implementation.
When you run the
gulp extension:create command, the developer tools create this baseline extension in a Workspace directory within your top-level extension development directory. The baseline extension starts out with one module that you design, based on your needs. It can include any combination of the following file types within one new module:
To create a baseline extension:
Open a command line or terminal.
Access the top-level extension development directory you created when you installed the extension developer tools.
Enter the following command:
When prompted, enter the following information:
Unless otherwise directed, create all entries using only alphanumeric characters without spaces.
Pressing enter results in the default value.
Set Your Extension Fantasy Name – Provide a name for your extension as you want it to appear in the NetSuite user interface. This can contain special characters and spaces. For example:
My Cool Extension!
Set Your Extension Name – Provide a name for your extension’s files and folders within your development environment.
Set the Vendor Name – Enter your business, vendor, or partner name.
Assign a Version Number– Add a version number for your extension.
To take advantage of extension update requirements, use semantic versioning (SemVer) notation. For more information, see https://semver.org/.
Set a Description for Your Extension – Provide some text to describe your extension. This string can contain spaces and special characters.
This Extension Supports – Select one of the following options:
(*) identifies the selected option. Use arrow keys to scroll. Press the spacebar to select an option, press
<a> key to select all, or
<i> key to invert your selections.
Set the Initial Module Name – Name the module to be created as part of the baseline extension. Each extension needs at least one module to contain your extension files.
This Extension Will Be Applied To – Select one or more applications that your extension requires. Options include: Shopping, My Account, and Checkout.
Target Version – Using Commerce versioning schema, enter a string to declare the target versions to which this extension applies. The developer tools prompt you for a target version for each product specified earlier. Leaving these prompts blank results in compatibility with all versions of the associated Commerce products.
See Declare Target Versions and SuiteScript 2.0 Bundle Installation Script Type for more information.
Select extension to add module – Select the name of the extension to contain this module. This option only appears if your Workspace directory contains more than one extension.
After following these prompts, you can optionally build on this baseline by adding additional modules. Consider the following topics:
When you have completed building baseline extension files in your developer environment, you are ready to develop your extension. See Extensions for details.
What Happens When You Create Extension files?
When you run the
gulp extension:create command, the extension developer tools:
Create the Workspace directory in your top-level development directory, unless it already exists.
Create a subdirectory to house all of your extension’s code. This is where you develop your extension.
Create a manifest.json file. This file includes all the information required to compile resources for your extension.
You run the
gulp extension:create command and build a baseline extension, MyCoolExtension with a module called MyCoolModule. You set this extension to include all available files.
In this example, your Workspace directory structure should look similar to following: