How SuiteCommerce Advanced Combines Source Files Efficiently
SuiteCommerce Advanced utilizes Gulp.js to streamline source files into efficient combined files for improved web performance.
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
- SCA Build Process
- The distro.json and ns.package.json Files
- Contents of the Deploy and Local Distribution Directories
Using Gulp commands, developers can create deploy directories suited to their implementation:
- Deploy Command:
- For SCA 2019.2 and later, it generates
DeployDistributionAdvancedandDeployDistributionAdvancedSS2directories. - For SCA 2019.1 or earlier, it generates the
DeployDistributiondirectory.
- For SCA 2019.2 and later, it generates
- Local Command:
- For SCA 2019.2 and later, it results in the
LocalDistibutionAdvanceddirectory. - For SCA 2019.1 or earlier, it creates the
LocalDistributiondirectory.
- For SCA 2019.2 and later, it results in the
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?
Do developers need to manually transfer resources like images to the Distribution directory?
What happens if I modify files directly in the deploy or local distribution directories?
How does SuiteCommerce Advanced handle file combination for older versions like 2019.1?
Was this article helpful?
More in Commerce
- SuiteCommerce CAPTCHA Configuration Options and Setup
Configure SuiteCommerce CAPTCHA for enhanced security. Enable CAPTCHA for registration, login, guest checkout, and orders.
- Single Sign-On Integration for NetSuite Web Stores
Implement inbound single sign-on integration for NetSuite web stores using SAML or OpenID Connect for seamless access.
- Facets Management for Commerce in NetSuite
Facets management in NetSuite Commerce optimizes item search filters, enhancing performance and improving user experience.
- SuiteCommerce Analytics Data and Cookie Consent Integration
SuiteCommerce Analytics Data enables tracking of shopper behavior. This requires a cookie consent extension for user preferences.
Advertising
Reach Commerce Professionals
Put your product in front of NetSuite experts who work with Commerce every day.
Sponsor This Category