Edit the Extension Manifest: Sass

Documentation article about Sass Your extension's Workspace directory includes a manifest.json file, which includes all the information required to compile

·3 min read·1 views·View Oracle Docs

Your extension's Workspace directory includes a manifest.json file, which includes all the information required to compile resources for the extension.

../Workspace/<EXTENSION_DIRECTORY>/manifest.json

This file is auto-generated when you execute the gulp extension:create command and includes all JavaScript, JSON, SuiteScript, HTML templates, Sass, and assets required to compile and activate your extension.

Manual Edits

This file lists all JavaScript, JSON, SuiteScript, HTML templates, Sass, and assets related to your extension. Although this file is automatically generated, you may need to update it manually if adding Sass entry points for any newly introduced Sass files or changing CCT labels.

Warning:

Potential data loss. Besides compiling and deploying your extension to a local server, the gulp extension:local and gulp extension:deploy commands update the extension's manifest.json file and overwrites any manual changes you made to this file.

To preserve manual changes to manifest.json use the following commands to test your extension locally or deploy to NetSuite:

  • gulp extension:local --preserve-manifest

  • gulp extension:deploy --preserve-manifest

Extension Metadata

The first entries in the manifest file include metadata about the extension itself. These fields are automatically populated when you initially run the gulp extension:create command.

json
1{
2 "name": "MyCoolExtension",
3 "fantasyName": "My Cool Extension!",
4 "vendor": "Acme",
5 "type": "extension",
6 "target": "SCA,SCS",
7 "target_version": {
8 "SCA": "19.2.0",
9 "SCS": "19.2.0"
10 },
11 "version": "1.0.0",
12 "description": "My cool extension does magic!",
13 //...
  • name (string) - uniquely identifies the name of the extension. This field is required. This must be alphanumeric characters without spaces.

  • fantasyName (string) - identifies the label for the extension. This field can include special characters.

  • vendor (string) - identifies the vendor as a string. This field is required.

  • type (string) - indicates the type as an extension. This field is required.

  • target (comma-separated string) - indicates the SuiteCommerce or SCA applications supported by the extension. This field is required.

  • target_version ( array) - indicates the SuiteCommerce or SCA application versions supported by the extension. This field is required.

  • version (string) - indicates the version of the extension, such as 1.0.0. This field is required.

  • description (string) - provides a description of the extension as it appears in NetSuite. This field is optional.

Important:

To take advantage of extension update requirements, version numbers should follow this format, where d is a single digit: dd.dd.dd.

Assets

The assets object defines paths to the images and fonts located in the extension directory's assets folder. This defines an array for each image and font used. These paths are relative to the extension's assets folder path. Extensions treat services as assets. These are created on NetSuite servers when you activate/deploy your extension.

If the extension developer tools detect a file name with the pattern XYZ.ServiceController.js, they create the service (.ss) file and add a reference in the manifest. Later, when you activate the extension, the .ss file deploys to the backend as an asset.

json
1//...
2"assets": {
3 "img": {
4 "files": []
5 },
6 "fonts": {
7 "files": []
8 },
9 "services": {
10 "files": [
11 "services/MyCoolModule.Service.ss",
12 "services/AdditionalCoolModule.Service.ss"
13 ]
14 }
15},
16//...

Configuration

The configuration object defines paths to the JSON files in your extension directory's Configuration folder.

json
1//...
2"configuration": {
3 "files": [
4 "Modules/MyCoolModule/Configuration/MyCoolModule.json",
5 "Modules/AdditionalCoolModule/Configuration/AdditionalCoolModule.json"
6 ]
7},
8//...

Templates

The templates object lists all HTML template files included in the extension by application. The application object includes one object per application (shopping, myaccount, and checkout). Each application lists each file in the files array.

json
1//...
2"templates": {
3 "application": {
4 "shopping": {
5 "files": [
6 "Modules/MyCoolModule/Templates/acme_mycoolextension_mycoolmodule_list.tpl",
7 "Modules/MyCoolModule/Templates/acme_mycoolextension_mycoolmodule_edit.tpl",
8 "Modules/AdditionalCoolModule/Templates/acme_mycoolextension_additionalcoolmodule_list.tpl",
9 "Modules/AdditionalCoolModule/Templates/acme_mycoolextension_additionalcoolmodule_edit.tpl"
10 ]
11 },
12 "myaccount": {
13 "files": [
14 "Modules/MyCoolModule/Templates/acme_mycool

Frequently Asked Questions (4)

Do I need to manually add new Sass files to the deployment configuration in NetSuite?
Yes, when you introduce a new Sass file into your extension workspace, you must manually add it to the files array within the sass object.
In what order should I list Sass files in the configuration?
You should declare each Sass file in an order that makes semantic sense within the Sass hierarchy. Dependencies may require adjustments to the order, even though the developer tools automatically add new Sass files to the end of the array.
What happens if I don't change the order of automatically added Sass files?
If you don't adjust the order, dependencies might break if they expect a different loading sequence. The developer tools add files to the end of the array, which may not always align with required dependencies.
Is adjusting the order of Sass files acquired automatically by developer tools necessary?
Yes, checking and adjusting the order of Sass files in the configuration array is necessary to ensure that dependencies are satisfied and semantic sense is maintained within the Sass hierarchy.
Source: Sass Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in General

View all General articles →