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: To set up your ns.package.json file:
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
General Notices
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 SuiteCloud Development Framework
- Custom Tool Script Enhancements in NetSuite
NetSuite 2026.1 enhances custom tool scripts with execution logs, a new management page, and binary file support. TL;DR Opening
- beforeUndeploy Installation Hook in NetSuite 2026.1
Introducing the beforeUndeploy installation hook in NetSuite 2026.1 for custom pre-uninstall logic in SuiteApps.
- SuiteCloud CLI for Node.js: New Features Overview
Explore the new features of SuiteCloud CLI for Node.js, enhancing SuiteCloud project development with interactive tools.
- SuiteCloud Development Framework in NetSuite 2026.1
SuiteCloud Development Framework features in NetSuite 2026.1 enhance customization, deployment, and management for developers.
Advertising
Reach SuiteCloud Development Framework Professionals
Put your product in front of NetSuite experts who work with SuiteCloud Development Framework every day.
Sponsor This Category