How SuiteCommerce Advanced Combines Source Files Efficiently

SuiteCommerce Advanced utilizes Gulp.js to streamline source files into efficient combined files for improved web performance.

·2 min read·View Oracle Docs

The SuiteCommerce Advanced (SCA) source code is designed with modular organization across multiple subdirectories containing files such as JavaScript, Sass, and, for versions 2019.2 and later, TypeScript files identifiable by the .ts extension. This logical structure enhances readability but creates inefficiencies in network performance when files are individually transmitted to a web browser.

To optimize loading times, SuiteCommerce Advanced employs Gulp.js to carry out several tasks:

  • File Inclusion: Identifies which files are necessary for the web application.
  • File Combination: Merges JavaScript, Sass, and SSP library files into single combined files.
  • Resource Copying: Transfers additional resources, such as images and SSP files, essential for application functionality.

All combined resources, along with any copied files, are stored in the Distribution directory, which is then deployed to NetSuite. For more details, refer to the output generated by the gulp tasks.

Related Topics

Using Gulp commands, developers can create deploy directories suited to their implementation:

  • Deploy Command:
    • For SCA 2019.2 and later, it generates DeployDistributionAdvanced and DeployDistributionAdvancedSS2 directories.
    • For SCA 2019.1 or earlier, it generates the DeployDistribution directory.
  • Local Command:
    • For SCA 2019.2 and later, it results in the LocalDistibutionAdvanced directory.
    • For SCA 2019.1 or earlier, it creates the LocalDistribution directory.

It is crucial not to directly modify any files in the deploy or local distribution directories, although their contents may be reviewed for troubleshooting purposes.

Frequently Asked Questions (4)

Does the use of TypeScript in SuiteCommerce Advanced apply to all versions?
TypeScript files are utilized in SuiteCommerce Advanced starting from version 2019.2 and later, as indicated by the '.ts' file extension used in these versions.
Do developers need to manually transfer resources like images to the Distribution directory?
No, Gulp.js handles copying additional resources such as images and SSP files into the Distribution directory, which is then deployed to NetSuite.
What happens if I modify files directly in the deploy or local distribution directories?
Direct modification of files in the deploy or local distribution directories is discouraged. These directories should remain unchanged, although their contents can be reviewed for troubleshooting.
How does SuiteCommerce Advanced handle file combination for older versions like 2019.1?
For SCA 2019.1 or earlier, the Gulp deploy command generates the ‘DeployDistribution’ directory, and similarly, the local command results in the 'LocalDistribution' directory, implying file combination in these structures.
Source: How Files Are Combined Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in Commerce

View all Commerce articles →