Top-Level Extension Development Directory for SuiteCommerce

The top-level extension development directory organizes files and tools for efficient SuiteCommerce extension development.

·3 min read·View Oracle Docs

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/FolderDescription
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_modulesGenerated when you run npm install; this directory stores all dependencies required by your development tools.
ns_npm_repositoryContains 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.jsHolds all JavaScript necessary to run Gulp.js and manage tasks.
package.jsonMaintains 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.

none
<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/FolderDescription
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.jsonThis 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:

none
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.json

Additional 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/FolderDescription
    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?
The 'DeployDistribution/' folder is created when running the 'gulp extension:deploy' command and contains compiled files set for deployment to the NetSuite file cabinet. Manual edits are not allowed to prevent errors.
Can I manually edit files in the 'LocalDistribution/' and 'Extras' directories?
No, you should not manually edit files in the 'LocalDistribution/' and 'Extras' directories. They are maintained by Gulp.js processes and manual edits can lead to errors.
What does the 'manifest.json' file in the Extension Directory do?
The 'manifest.json' file tracks all extensible resources for the extension and updates automatically during development. Manual edits to this file should be avoided as this may disrupt the development process.
How are extension directories structured within the 'Workspace/' directory?
Within the 'Workspace/' directory, each extension you create has its own directory. It includes subdirectories like 'assets/', 'Modules/', and a 'manifest.json' file, each serving different roles for images, functionalities, and resource tracking respectively.
Source: The Top-Level Extension Development Directory 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 SuiteScript

View all SuiteScript articles →