Gulp Command Reference for Theme and Extension Developer Tools

The following tables list the Gulp.js commands required when using the theme or extension developer tools with your Commerce website:

Note:

For a list of commands used with the SuiteCommerce Advanced (SCA) developer tools, see Gulp Command Reference for SCA Developer Tools.

Theme Developer Gulp Commands

Command

Description

gulp theme:fetch

Downloads the active theme and extension files (Sass, HTML, and other assets) for the specified domain. You must have already activated a theme using the Manage Extensions wizard in NetSuite for this command to run. This command places these files in the top-level directory’s Theme directory. If this is the first time running this command, the development tools create subdirectories for these files.

gulp theme:fetch --account

Use the --account parameter only for release 2021.2.1 and later accounts that have account-specific domains.

Specify your account number with the gulp command to enable access to the NetSuite account. For example, if your account number is 123456, you can enter the following command to successfully authenticate and fetch from your NetSuite account:

gulp theme:fetch --account 123456

For sandbox accounts, specify your account number as shown in this example:

gulp theme:fetch --account 123456–sb1

For more information, see URLs for Account-Specific Domains.

gulp theme:fetch --to

Fetches a theme from NetSuite as usual, but this command prompts for login credentials.

gulp theme:local

Compiles all Sass and HTML template files for a theme into a functional application. This command also updates the theme manifest.json.

After compilation, this command starts a local server. This server watches for changes to Sass and HTML template files. After the server starts, any changes you make to your theme files or extension overrides are automatically recompiled and visible in the browser.

gulp theme:local --preserve-manifest

Performs the same action as gulp theme:local, but it does not update the manifest. Use this command to test your theme locally if you have made any manual changes to the manifest.json file for the theme.

gulp theme:deploy

Compiles Sass, HTML, and asset files into a DeployDistribution folder. This command also updates the theme manifest.json.

If you are deploying changes to a published theme, the development tools prompt you for a Vendor Name, Theme Name, Theme Version, Description, and Application when you initially run this command. This command forces you to name a new theme.

If you are deploying customizations to a custom theme, this command does not prompt you for this information and gives you the option to create a new theme or update the existing theme.

The development tools then create a folder for the theme in the NetSuite File Cabinet and deploy the customized theme's code.

In addition to compiling the application, this command creates the .nsdeploy file, if it does not already exist.

gulp theme:deploy --account

Use the --account parameter only for release 2021.2.1 and later accounts that have account-specific domains.

Specify your account number with the gulp command to enable access to the NetSuite account. For example, if your account number is 123456, you can enter the following command to successfully authenticate and deploy to your NetSuite account:

gulp theme:deploy --account 123456

For sandbox accounts, specify your account number as shown in this example:

gulp theme:deploy --account 123456–sb1

For more information, see URLs for Account-Specific Domains.

gulp theme:deploy --preserve-manifest

Performs the same action as gulp theme:deploy, but it does not update the manifest. Use this command to deploy your theme if you have made any manual changes to the manifest.json file for the theme.

gulp theme:deploy --advanced

Deploys as an update of the current custom theme, but resets the prompts regarding the Vendor Name, Theme Name, Theme Version, Description, and Application. This command also rewrites this information in the theme’s manifest.json file.

This command only takes effect on custom themes.

gulp theme:deploy --create

Creates a new theme instead of updating the existing theme.

gulp theme:deploy --skip-compilation

Deploys the current contents of the DeployDistribution folder without compiling the application. Although the developer tools do not deploy a compiled set of files, the default action is to compile files as a final test of your code. Using this command skips this check.

gulp theme:deploy --source templates

Deploys only the HTML template files.

gulp theme:deploy --source sass

Deploys only Sass files.

gulp theme:deploy --source assets

Deploys only theme asset files.

gulp theme:deploy --source skins

Deploys only theme skin preset files.

gulp extension:deploy --source <multiple>

Deploys more than one type of source code when you separate multiple source deployments by commas. For example, gulp extension:deploy --source templates,sass

gulp theme:deploy --to

Deploys to NetSuite as usual, but resets the login credentials, rewriting the .nsdeploy file.

gulp theme:deploy --reactivate

Deploys and reactivates the themes and extensions on your website.

gulp theme:update-manifest

Updates the theme’s manifest.json file without requiring a deployment.

gulp validate

Validates the theme’s manifest.json file and confirms that the file does not list any files that do not exist in the theme folder.

gulp clear

Removes the DeployDistribution and LocalDistribution directories and the .nsdeploy file.

gulp reactivate

Triggers a reactivation process of all the extensions and themes installed on your website.

gulp reactivate --async

Triggers a reactivation process of all the extensions and themes installed on your website asynchronously.

gulp reactivate --update

Triggers a reactivation process of all the extensions and themes installed on your website, updating each to the latest available version.

gulp reactivate --token

Triggers a reactivation process of all the extensions and themes installed on your website, using a token for authentication. The format is: <key>:<secret>.

This parameter requires use of the --account parameter as well.

gulp reactivate --account

Specifies the target account number when triggering the reactivation process.

This parameter is required when using the --token parameter.

gulp reactivate --to

Triggers a reactivation process of all the extensions and themes installed on your website as usual, but this command prompts for login credentials.

gulp reactivate --website

Specifies the target website when triggering the reactivation process.

gulp reactivate --domain

Specifies the target domain when triggering the reactivation process.

gulp reactivate --subsidiary

Specifies the target subsidiary when triggering the reactivation process.

This parameter only applies to SuiteCommerce InStore.

gulp reactivate --location

Specifies the target location when triggering the reactivation process.

This parameter only applies to SuiteCommerce InStore.

gulp reactivate --m

Specifies the molecule to be used when triggering the reactivation process.

For example, gulp reactivate --m f uses system.f.netsuite.com.

gulp

Displays a list of all gulp commands.

Extension Developer Gulp Commands

Command

Description

gulp extension:create

Creates an example extension (with one example module) to use as a baseline for development. This command creates all necessary folders to store and maintain your customizations within your top-level extension development directory.

gulp extension:create-module

Creates an additional module within your extension. This command prompts you for information about the module you want to create and the extension within which you want to create it.

gulp extension:fetch

Downloads the active theme and compiles all theme resources (Sass, HTML, and other assets). This command places theme files in the top-level extension development directory’s Extras folder. If this is the first time running this command, the development tools create subdirectories for these files.

Note:

Any downloaded theme files are only provided for testing your extensions locally. You do not customize any theme files in your top-level extension development directory.

If you choose to continue development on a previously deployed, custom extension, this command also downloads these files, placing them in your Workspace/<EXTENSION_FOLDER>. The extensions must be activated using the Extension Manager.

Note:

This command does not download published extensions. You cannot customize published content.

gulp extension:fetch --account

Use the --account parameter only for release 2021.2.1 and later accounts that have account-specific domains.

Specify your account number with the gulp command to enable access to the NetSuite account. For example, if your account number is 123456, you can enter the following command to successfully authenticate and fetch from your NetSuite account:

gulp extension:fetch --account 123456

For sandbox accounts, specify your account number as shown in this example:

gulp extension:fetch --account 123456–sb1

For more information, see URLs for Account-Specific Domains.

gulp extension:fetch <arg>

Downloads the files of a specific extension, where <arg> is the name of the extension. This can be helpful if you want to use a previously deployed extension as a baseline for a new one. You can fetch multiple extensions, separated by a comma.

For example: gulp extension:fetch --fetch Badges,CartExtension.

Note:

Extensions must be active to download code or to view them on a local server.

gulp extension:local

Compiles your custom extension files into a functional application and places them in a LocalDistibution folder.

After compilation, this command starts a local server. This server watches for changes to any extension files. After the server starts, any changes you make to your extension files are automatically recompiled and visible in the browser.

gulp extension:local --preserve-manifest

Performs the same action as gulp extension:local, but it does not update the manifest. Use this command to test your extension locally if you have made any manual changes to the manifest.json file for the extension.

gulp extension:deploy

Compiles your custom extension files into a functional application and places them into a DeployDistribution folder.

If you have more than one extension in your top-level development directory, this command prompts you to declare which extension to deploy.

If you have never deployed the extension, this command prompts you for information about the extension.

The development tools then create a folder for the extension in the NetSuite File Cabinet and deploy the customized extension code.

In addition to compiling the application, this command creates the .nsdeploy file, if it does not already exist.

gulp extension:deploy --account

Use the --account parameter only for release 2021.2.1 and later accounts that have account-specific domains.

Specify your account number with the gulp command to enable access to the NetSuite account. For example, if your account number is 123456, you can enter the following command to successfully authenticate and deploy to your NetSuite account:

gulp extension:deploy --account 123456

For sandbox accounts, specify your account number as shown in this example:

gulp extension:deploy --account 123456–sb1

For more information, see URLs for Account-Specific Domains.

gulp extension:deploy --preserve-manifest

Performs the same action as gulp extension:deploy, but it does not update the manifest. Use this command to deploy your extension if you have made any manual changes to the manifest.json file for the extension.

gulp extension:deploy --advanced

Deploys an update of the extension, but resets the prompts regarding the Vendor Name, Extension Name, Version, Description, Application, etc. This command also rewrites this information in the extension manifest.json file.

gulp extension:deploy --skip-compilation

Deploys the current contents of the DeployDistribution folder without compiling the application. Although the developer tools do not deploy a compiled set of files, the default action is to compile files as a final test of your code. Using this command skips this check.

gulp extension:deploy --source configuration

Compiles and deploys only configuration JSON files.

gulp extension:deploy --source javascript

Compiles and deploys only JavaScript files.

gulp extension:deploy --source ssp-libraries

Compiles and deploys only ssp-libraries.

gulp extension:deploy --source services

Compiles and deploys only services.

gulp extension:deploy --source sass

Compiles and deploys only Sass files.

gulp extension:deploy --source templates

Compiles and deploys only HTML files.

gulp extension:deploy --source assets

Compiles and deploys only assets.

gulp extension:deploy --source <multiple>

Deploys more than one type of source code when you separate multiple source deployments by commas. For example, gulp extension:deploy --source templates,sass

gulp extension:deploy --reactivate

Deploys and reactivates the extensions and themes on your website.

gulp extension:update-manifest

Updates the extension’s manifest.json file without requiring a deployment.

gulp validate

Validates the theme’s manifest.json file and confirms that the file does not list any files that do not exist in the theme folder.

gulp clear

Removes the DeployDistribution and LocalDistribution directories and the .nsdeploy file.

gulp reactivate

Triggers a reactivation process of all the extensions and themes installed on your website.

gulp reactivate --async

Triggers a reactivation process of all the extensions and themes installed on your website asynchronously.

gulp reactivate --update

Triggers a reactivation process of all the extensions and themes installed on your website, updating each to the latest available version.

gulp reactivate --token

Triggers a reactivation process of all the extensions and themes installed on your website, using a token for authentication. The format is: <key>:<secret>.

This parameter requires use of the --account parameter as well.

gulp reactivate --account

Specifies the target account number when triggering the reactivation process.

This parameter is required when using the --token parameter.

gulp reactivate --to

Triggers a reactivation process of all the extensions and themes installed on your website as usual, but this command prompts for login credentials.

gulp reactivate --website

Specifies the target website when triggering the reactivation process.

gulp reactivate --domain

Specifies the target domain when triggering the reactivation process.

gulp reactivate --subsidiary

Specifies the target subsidiary when triggering the reactivation process.

This parameter only applies to SuiteCommerce InStore.

gulp reactivate --location

Specifies the target location when triggering the reactivation process.

This parameter only applies to SuiteCommerce InStore.

gulp reactivate --m

Specifies the molecule to be used when triggering the reactivation process.

For example, gulp reactivate --m f uses system.f.netsuite.com.

gulp

Displays a list of all gulp commands.

Related Topics

Gulp Commands
Gulp Command Reference for SCA Developer Tools

General Notices