Gulp Command Reference for Themes and Extensions

This topic applies to

Applies to

Aconcagua | SuiteCommerce Web Stores

The following tables lists Gulp.js commands required when using the theme or extension developer tools with your SuiteCommerce site:

Note

For a list of commands used with the SuiteCommerce Advanced (SCA) developer tools, see Theme Developer Gulp Commands.


Theme Developer Gulp Commands

Command

Description

gulp theme:fetch

This command 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 --to

This command fetches a theme and extensions from NetSuite as usual, but it prompts for login credentials, ignoring the .nsdeploy file.

gulp theme:local

This command 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

This 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

This command 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 --preserve-manifest

This 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

This command 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

This command creates a new theme instead of updating the existing theme.

gulp theme:deploy --skip-compilation

This command 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

This command only deploys the HTML template files.

gulp theme:deploy --source sass

This command only deploys Sass files.

gulp theme:deploy --source assets

This command only deploys theme asset files.

gulp theme:deploy --source skins

This command only deploys theme skin preset files.

gulp extension:deploy --source <multiple>

Separate multiple source deployments by commas to deploy more than one type of source code. For example, gulp extension:deploy --source templates,sass

gulp theme:deploy --to

This command deploys to NetSuite as usual, but resets the login credentials, rewriting the .nsdeploy file.

gulp theme:local styleguide

This command compiles your Sass, parses all KSS blocks declared in the Sass files, and creates a style guide accessible in your localhost (localhost:3000/). See Style Guide for more information.

gulp theme:update-manifest

This command updates the theme’s manifest.json file without requiring a deployment.

gulp validate

This command 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

This command removes the DeployDistribution and LocalDistribution directories and the .nsdeploy file.

gulp

This command displays a list of all gulp commands.

Extension Developer Gulp Commands

Command

Description

gulp extension:create

This command 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

This command 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

This command 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 also 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 active using the Manage Extensions wizard in NetSuite.

Note

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


gulp extension:fetch <arg>

This command 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

This command 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

This 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

This command 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 --preserve-manifest

This 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

This command 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

This command 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

This command only compiles and deploys configuration JSON files.

gulp extension:deploy --source javascript

This command only compiles and deploys JavaScript files.

gulp extension:deploy --source ssp-libraries

This command only compiles and deploys ssp-libraries.

gulp extension:deploy --source services

This command only compiles and deploys services.

gulp extension:deploy --source sass

This command only compiles and deploys Sass files.

gulp extension:deploy --source templates

This command only compiles and deploys HTML files.

gulp extension:deploy --source assets

This command only compiles and deploys assets.

gulp extension:deploy --source <multiple>

Separate multiple source deployments by commas to deploy more than one type of source code. For example, gulp extension:deploy --source templates,sass

gulp extension:update-manifest

This command updates the extension’s manifest.json file without requiring a deployment.

gulp validate

This command 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

This command removes the DeployDistribution and LocalDistribution directories and the .nsdeploy file.

gulp

This command displays a list of all gulp commands.