Fetch Active Theme and Extension Files in SuiteCommerce
Fetch active theme and extension files in SuiteCommerce using Gulp commands for local testing and development.
The gulp extension:fetch command is vital for developers working with SuiteCommerce or SuiteCommerce Advanced (SCA). Before deploying or testing an extension locally, you must download the files for the currently active theme. This command retrieves HTML and Sass files for the active theme and any custom extensions that are active. It ensures that the necessary files are present in your local extension workspace, which is crucial for successful local testing and deployment.
Understanding the gulp extension:fetch Command
Running the gulp extension:fetch command does the following:
- Downloads necessary HTML and Sass files for the currently active theme. Do not modify these files, as they are for reference only.
- Downloads files for any custom extensions currently activated.
This command is essential as the developer tools need theme files to compile a local distribution for testing your extension. When you run this command, it will facilitate subsequent testing and deployment processes because it provides the developer tools with the required files.
Important Considerations
- Overwrite Warning: Executing
gulp extension:fetchwill overwrite any existing extension files in your local workspace. Ensure that you've deployed your current work to NetSuite before proceeding to avoid losing any progress. - Published Extensions: Note that the command does not fetch files for published extensions, which are installed as part of a SuiteApp and cannot be edited due to copyright restrictions.
Steps to Fetch Active Files
- In your local development environment, open a command line or terminal and navigate to the top-level extension development directory.
- Run the command:
gulp extension:fetch
- If prompted, provide your Authentication ID, which is utilized for representing your NetSuite account and role. If you’ve previously created an ID, the tools will not prompt for it again.
- To switch accounts, utilize the
--toparameter and create or select a different Authentication ID.
- To switch accounts, utilize the
- Choose your NetSuite account, role, and the specific domain with the active theme or extensions you wish to access.
- Optional: If you have any active extensions for the selected domain, you can download their working files.
The gulp extension:fetch command creates a subdirectory under your Workspace/Extras directory specifically for the fetched theme files. These are strictly for use by developer tools.
Conclusion
By understanding and utilizing the gulp extension:fetch command effectively, developers can streamline the process of extension development within SuiteCommerce. Always ensure that your working files are backed up to prevent loss during the fetching process.
Key Takeaways
- Use the
gulp extension:fetchcommand to download active theme and extension files for SuiteCommerce. - Be cautious of overwriting existing files to avoid losing unsaved work.
- Ensure you have the correct permissions and account information before executing Gulp commands.
Frequently Asked Questions (4)
What happens to my local files when I run the `gulp extension:fetch` command?
Does the `gulp extension:fetch` command work with published extensions in SuiteCommerce?
What prerequisites are there for using the `gulp extension:fetch` command in SuiteCommerce?
Can I fetch files for custom extensions using the `gulp extension:fetch` command?
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