Set Up Your ns.package.json and distro.json Files
Documentation article about Set Up Your ns.package.json and distro.json Files
To set up your ns.package.json file:
-
Open your root CCT module directory.
-
Create a new file in the custom module and name it
ns.package.json.For example:
../SC.CCT.ImageViewer@0.0.1/ns.package.json -
Build the ns.package.json file using the following code:
json1{2 "gulp": {3 "javascript": [4 "JavaScript/*"5 ]6 , "templates": [7 "Templates/*"8 ]9 }10}Note:
If your CCT includes any custom Sass, SuiteScript, services, or configuration files, you must account for these files here as well.
To set up your distro.json file:
-
Open the distro.json file.
-
If implementing SCA 2019.2 or later, the distro.json file is located in the Advanced directory of the SCA source code. Examples: SC_20.1/Advanced/distro.json, SC_19.2_Live/Advanced/distro.json
-
If implementing SCA 2019.1 or earlier, this file is located in the top-level directory of your SCA development directory.
-
-
Add an entry for the new CCT module in the modules object to ensure that the Gulp tasks include your code when you deploy to NetSuite. It should look similar to the following examples.
-
If implementing SCA 2019.2 or later, it should look similar to:
json1{2 "name": "SuiteCommerce Advanced Live",3 "version": "2.0",4 "modules": {5 //...6 "../Advanced/SC.CCT.Html": "1.0.0",7 "../Advanced/SC.CCT.ImageViewer": "0.0.1",8 //...9} -
If implementing SCA 2019.1 or earlier, it should look similar to:
json1{2 "name": "SuiteCommerce Advanced 1.0.0",3 "version": "1.0.0",4 "modules": {5 //...6 "suitecommerce/SC.CCT.Html": "1.0.0",7 "suitecommerce/SC.CCT.ImageViewer": "0.0.1",8 //...9}
-
-
Define any application dependencies for the preferred application (Shopping, My Account, or Checkout), within the
javascriptobject.For the example ImageViewer CCT, you add the module to the
SC.Shopping.Starterentry point.json1//...2"javascript": [3 {4 "entryPoint": "SC.Shopping.Starter",5 "exportFile": "shopping.js",6 "dependencies": [7 "Backbone.View.Plugins",8 "jQuery.html",9 "ItemDetails",10 //...11 "SC.CCT.Html",12 "SC.CCT.ImageViwer"13 ],14//... -
If your CCT includes any Sass, include the module definition in the dependencies array of the preferred application (Shopping, My Account, or Checkout) within the
sassobject.For the example ImageViewer CCT, your code might look similar to:
json1//...2 "sass": {3 //...4 "applications": [5 {6 "name": "Shopping",7 "exportFile": "shopping.css",8 "dependencies": [9 {10 //...11 "PickupInStore",12 "Location.SCA",13 "SC.CCT.ImageViewer"14 ]15//... -
Save the
distro.jsonfile. -
If you have not already set your NetSuite records, complete the tasks as defined in Site Management Tools Custom Content Type.
Important:
Creating a custom module is only one step in the process. You must still perform the steps necessary to set up your custom module for use in SMT.
-
Test your custom module in your local environment or deploy to your NetSuite account. See Develop Your SCA Customization for details.
Related Topics
- Create Custom Content Types for SMT
- Create a Custom Module for Your CCT
- Create an Entry Point File
- Create a View File
- Create a Template File
--- Context from https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/chapter_4809772539.html --- This information refers to the Kilimanjaro release of SuiteCommerce Advanced or later.
The custom content type in Site Management Tools (SMT) lets Commerce extension developers create custom website applications or features, all managed through the SMT interface. This lets Commerce users add custom content and expand their website's features. There are two main steps to add custom content types to your Commerce site. First, you create your custom Commerce module. This means creating your JavaScript code, CSS, and other res
Frequently Asked Questions (4)
What files should be accounted for in the ns.package.json file for a custom CCT module?
Where should the distro.json file be located for different versions of SCA?
How do you add a new CCT module to the distro.json file for SCA 2019.2 or later?
What additional steps must be completed after setting up ns.package.json and distro.json?
Was this article helpful?
More in General
- Field Service Management Enhancements and Bug Fixes for 2026
Overview of the 2026 Field Service Management SuiteApp updates showcasing enhancements and bug fixes.
- Example
Documentation article about Example
- Pass String Literals
Documentation article about Pass String Literals
- Manual Edits
Documentation article about Manual Edits
Advertising
Reach General Professionals
Put your product in front of NetSuite experts who work with General every day.
Sponsor This Category