How Files Are Combined

This topic applies to

Applies to

SuiteCommerce Advanced


The SuiteCommerce Advanced source code is divided into multiple modules. These modules contain multiple subdirectories which, in turn, contain individual files, including JavaScript and Sass files. If you are implementing SuiteCommerce Advanced 2019.2 or later, there will also be TypeScript files which are identified with a .ts filename extension. The contents of each of these files contains a logical structure where each element is separated by white space.

While this organization makes the source files easy to read and understand, it is inefficient when passing these files across a network to a web browser. Most modern web applications use some method of combining multiipl files spread across multiple directories into a smaller number of combined files. These files are more efficient for a web browser to load because of the fewer number of requests required and smaller total number of bytes transferred.

To combine these files, SuiteCommerce Advanced uses Gulp.js to perform the following tasks:

  • Determine which files need to be included in the web application.

  • Combine all of the JavaScript, Sass, and SSP library files into single files.

  • Copy any additional resources required by the application. For example, Gulp.js copies any image files, SSP files or services.

All resources required by SuiteCommerce Advanced, including combined and copied files, are stored in the Distribution directory. This directory is deployed to NetSuite. See Contents of the Deploy and Local Distribution Directories for information on the output of the gulp tasks.