Set Up Your ns.package.json and distro.json Files

This topic applies to

Applies to



To set up your ns.package.json file:

  1. Open your root CCT module directory.

  2. Create a new file in the custom module and name it ns.package.json.

    For example:


  3. Build the ns.package.json file using the following code:

    { "gulp": { "javascript": [ "JavaScript/*" ] , "templates": [ "Templates/*" ] } }


    If your CCT includes any custom Sass, SuiteScript, auto-generated services, or configuration files, you must account for this here as well.

To set up your distro.json file:

  1. Open the distro.json file.

    This file is located in the top-level directory of your SCA development directory.

  2. 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:

    { "name": "SuiteCommerce Advanced 1.0.0", "version": "1.0.0", "modules": { //... "suitecommerce/SC.CCT.Html": "1.0.0", "suitecommerce/SC.CCT.ImageViewer": "0.0.1", //... }
  3. Define any application dependencies for the desired application (Shopping, My Account, or Checkout), within the javascript object.

    For the example ImageViewer CCT, you add the module to the SC.Shopping.Starter entry point.

    //... "javascript": [ { "entryPoint": "SC.Shopping.Starter", "exportFile": "shopping.js", "dependencies": [ "Backbone.View.Plugins", "jQuery.html", "ItemDetails", //... "SC.CCT.Html", "SC.CCT.ImageViwer" ], //...
  4. If your CCT includes any Sass, include the module definition in the dependencies array of the desired application (Shopping, My Account, or Checkout) within the sass object.

    For the example ImageViewer CCT, your code might look similar to the following:

    //... "sass": { //... "applications": [ { "name": "Shopping", "exportFile": "shopping.css", "dependencies": [ { //... "PickupInStore", "Location.SCA", "SC.CCT.ImageViewer" ] //...
  5. Save the distro.json file.

  6. If you have not already set your NetSuite records, complete the tasks as defined in Custom Content Type.


    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.

  7. Test your custom module in your local environment or deploy to your NetSuite account. See Core SuiteCommerce Advanced Developer Tools for details.