Top-Level Extension Development Directory for SuiteCommerce
The top-level extension development directory organizes files and tools for efficient SuiteCommerce extension development.
The top-level extension development directory is crucial for developers working with SuiteCommerce. It contains essential files and folders that are automatically created during various stages of extension development. Understanding these components helps ensure a smooth development process, avoiding manual errors and potential data loss.
Key Components of the Top-Level Directory
Here's a breakdown of the primary files and folders you will find in the top-level extension development directory:
| File/Folder | Description |
|---|---|
DeployDistribution/ | Created upon running the gulp extension:deploy command, it contains all files related to the compiled application set for deployment to the NetSuite file cabinet. Manual edits are not permitted. |
gulp/ | This folder is generated upon extracting the extension developer tools, containing all necessary files for Gulp.js operations. Do not manually modify these. |
LocalDistribution/ | Formed after executing the gulp extension:local command, it houses files used by the local server for testing applications. Manual editing is prohibited. |
node_modules | Generated when you run npm install; this directory stores all dependencies required by your development tools. |
ns_npm_repository | Contains files necessary for the NPM package manager, created during the installation of extension developer tools. |
Workspace/ | This directory holds all extension files under development and includes an Extras/ folder for theme files used during local testing. |
gulpfile.js | Holds all JavaScript necessary to run Gulp.js and manage tasks. |
package.json | Maintains dependencies to operate the theme development tools. |
Understanding the Workspace Directory
The Workspace directory is where all extension files are maintained, structured to facilitate development. Within this directory, each extension created has a dedicated subdirectory along with an Extras directory for theme source files.
<Top-LevelDevelopmentDirectory>/ Workspace/ Extras/ <EXTENSION_DIRECTORY>/The Extension Directory:
When you run the gulp extension:create command, the developer tools will create a basic structure for your new extension. Each extension directory will include files, enabling you to start developing your functionalities.
| File/Folder | Description |
|---|---|
assets/ | Contains any images or fonts associated with the extension. |
Modules/ | Houses subdirectories that define specific functionalities, containing related JavaScript, SuiteScript, configuration, templates, etc. |
manifest.json | This file maintains all extensible resources for the extension and is updated automatically during development. |
Example of Workspace Structure:
Upon running the gulp extension:create command and naming your extension MyCoolExtension, the directory structure will look like this:
1<TopLevelDevelopmentDirectory>/2 Workspace/3 MyCoolExtension/4 assets/5 fonts/6 img/7 services/8 Modules/9 MyCoolModule/10 Configuration/11 JavaScript/12 Sass/13 SuiteScript/14 SuiteScript2/15 Templates/16 manifest.jsonAdditional Directories and Files
-
The Extras Directory is generated when you run
gulp extension:fetch. It includes files associated with the active theme for local testing, and manual edits to this directory are disallowed.File/Folder Description assets/Contains images and fonts from the active theme. Modules/Maintains module folders with HTML templates and Sass for reference during local testing. Overrides/Contains files associated with theme overrides, configurable without editing originals. manifest.jsonLists all template and asset information and should not be edited manually.
In conclusion, comprehensively understanding the top-level extension development directory and its components ensures efficient and organized extension development for SuiteCommerce.
Key Takeaways
- The top-level extension development directory includes multiple essential folders and files critical for development.
- Manual edits should be avoided in generated folders and files to prevent complications.
- Using the right commands during development allows for an organized and error-free environment.
Frequently Asked Questions (4)
What is the purpose of the 'DeployDistribution/' folder in the SuiteCommerce extension development directory?
Can I manually edit files in the 'LocalDistribution/' and 'Extras' directories?
What does the 'manifest.json' file in the Extension Directory do?
How are extension directories structured within the 'Workspace/' directory?
Was this article helpful?
More in SuiteScript
- Common SuiteScript Errors and Solutions for NetSuite
Common NetSuite script errors include INVALID_SCRIPT_DEPLOYMENT_ID and SSS_AUTHORIZATION_HEADER_NOT_ALLOWED. Learn effective solutions.
- Setting Field Values in SuiteScript for Effective Record
Learn to set field values in SuiteScript effectively, troubleshooting common errors and understanding data types.
- SuiteScript 2.1 Enhancements and API Updates in NetSuite
SuiteScript 2.1 enables execution of 2.0 scripts and supports PATCH method for enhanced API capabilities.
- Enhancements to SuiteScript User Role Context Clarification
SuiteScript updates clarify the user and role contexts for script executions, improving deployment understanding and management.
Advertising
Reach SuiteScript Professionals
Put your product in front of NetSuite experts who work with SuiteScript every day.
Sponsor This Category