Deploy Files

When all customizations are complete, you are ready to deploy your custom files to your Site Builder SSP Application in NetSuite. The following topics explain how to deploy custom files to the Custom implementation:

Important:

The customizations introduced by this patch are extensive. Always test changes in a sandbox account or other test site before deploying to a production account.

Prepare the Developer Tools For Your Customizations

Before you deploy your changes, you must prepare your Vinson developer tools to include your customizations. To do this:

  1. Create an ns.package.json file for each new module in your extensions subdirectory.

  2. Edit the distro.json file.

To create an ns.package.json file for each new module:

  1. Create a new file for each custom module in your extensions directory and title it: ns.package.json.

    You should end up with one unique ns.package.json file for each custom module.

  2. Open each ns.package.json file and paste the following code:

    The following example includes <placeholders> that you must change within each ns.package.json file.

                      {
       "gulp": {
          "javascript": [
             "JavaScript/*.js"
          ]
       },
       "overrides": {
          "suitecommerce/<MODULE>@<X.Y.Z>/<SUBDIRECTORY>/<EXISTING_FILE>" : "<NEW_SUBDIRECTORY>/<NEW_FILE>.js"
       }
    } 
    
                    
  3. Edit the placeholders in the overrides object as described below:

    • <MODULE> represents the name of each module being changed.

    • <X.Y.Z> represents the module version in your implementation.

    • <SUBDIRECTORY> represents the subdirectory containing the original file you are overriding.

    • <EXISTING_FILE> represents the original file you are overriding.

    • <NEW_SUBDIRECTORY> represents the subdirectory according to the table in Apply Patch to Source Files.

    • <NEW_FILE> represents the new file according to the table in Apply Patch to Source Files.

  4. Add the following as applicable:

    • Add an Internal, JavaScript, or SuiteScript array (as applicable) to the gulp object for each file type in the module.

      The table

    • Add a path to the overrides object for each file in the module.

    For example, the ns.package.json file for your custom CheckoutApplication@1.0.0 module should look similar to the following:

                      {
        "gulp": {
            "internal": [
                "Internal/*.ssp"
            ]
        ,    "javascript": [
                "JavaScript/*.js"
            ]
        ,    "ssp-libraries": [
                "SuiteScript/*.ssp"
                "SuiteScript/*.js"
            ]
        }
        
    ,   "overrides": {
            "suitecommerce/CheckoutApplication@2.2.0>/Internal/index-local.ssp" : "Internal/index-local.ssp"
        ,   "suitecommerce/CheckoutApplication@2.2.0>/JavaScript/SC.Checkout.Configuration.js" : "JavaScript/SC.Checkout.Configuration.js"
        ,   "suitecommerce/CheckoutApplication@2.2.0>/SuiteScript/checkout.environment.ssp" : "SuiteScript/checkout.environment.ssp"
        }
    
    } 
    
                    
  5. Repeat this procedure for each module, following the same basic structure.

To edit the distro.json file:

  1. Open the distro.json file. This is located in your root directory.

  2. Add each custom module to the modules object.

    Your code should look similar to the following example:

                      {
        "name": "SuiteCommerce Site Builder 2.0",
        "version": "2.0",
        "buildToolsVersion": "1.2.1",
        "folders": {
          "modules": "Modules",
          "suitecommerceModules": "Modules/suitecommerce",
          "thirdPartyModules": "Modules/third_parties",
          "distribution": "LocalDistribution",
          "deploy": "DeployDistribution"
        },
        "modules": {
          "suitecommerce/CheckoutApplication": "1.0.0",
          "suitecommerce/CheckoutSkipLogin": "1.0.0",
          "suitecommerce/GoogleUniversalAnalytics": "1.0.0",
          "suitecommerce/LiveOrder": "1.0.0",
          "suitecommerce/MyAccountApplication": "1.0.0",
          "suitecommerce/NavigationHelper": "1.0.0",
          "suitecommerce/ProductList": "1.0.0",
          "suitecommerce/Profile": "1.0.0",
          "suitecommerce/SiteSettings": "1.0.0",
          "suitecommerce/SspLibraries": "1.0.0",
          "suitecommerce/Utilities": "1.0.0",
          "suitecommerce/jQueryExtras": "1.0.0",
          "suitecommerce/Account": "2.2.0",
          //... 
    
                    

    This ensures that the Gulp tasks include your modules when you deploy. In this example, the custom modules are added at the beginning of the list of modules. However, you can add the modules anywhere in the modules object. The order of precedence in this list does not matter.

  3. Save the distro.json file.

Deploy Your Customizations to NetSuite

The last step is to deploy your customizations.

To deploy your customizations:

  1. Deploy your source code customizations to your NetSuite account (see Deploy SCA Customizations to NetSuite).

  2. Confirm your results.

    Upon successful deployment, you should be able to take advantage of secure shopping domains on your Site Builder site.

Related Topics

Configure a Secure Shopping Domain
Apply Patch to Source Files

General Notices