Testing and Deploying Extensions in SuiteCommerce

Test and deploy your SuiteCommerce extensions using Gulp commands for smooth development and activation in NetSuite.

·2 min read·View Oracle Docs

Testing and deploying extensions in SuiteCommerce is essential for ensuring that your customizations work properly before making them live on your website. By utilizing Gulp commands, developers can efficiently manage their extension code on local servers and deploy updates seamlessly.

How to Test Your Extension

To test your extension locally, run the following command:

bash
gulp extension:local

This command runs a local server that automatically recompiles your extension files whenever changes are made. This facilitates rapid debugging and ensures that you can see the effects of your changes immediately.

How to Deploy Your Extension

Once you are satisfied with your testing, you can deploy your extension to your NetSuite account. To deploy, you will utilize the following Gulp command:

bash
gulp extension:deploy

Steps to Deploy an Extension

  1. Fetch the Active Theme: Ensure that you have fetched the active theme before deploying your extension. This step is critical for the deployment process.
  2. Open Command Line: In your local developer environment, access the top-level directory of your extension.
  3. Run the Deploy Command: Execute the deploy command as shown above.
    • For accounts with account-specific domains, specify your account number with the deploy command:
    bash
    undefined

gulp extension:deploy --account {your_account_number}

- To prevent potential data loss, use the `--preserve-manifest` option:
```bash
gulp extension:deploy --preserve-manifest

This option protects any manual changes made to your manifest.json file during the deployment. 4. Follow Prompts: If prompted, follow the instructions for entering the required details using only alphanumeric characters.

Important Notes

  • The deployment process involves creating a local DeployDistribution directory, validating your code, and updating the manifest.json file automatically.
  • Always ensure you have the latest backup of your manifest.json if you have made manual modifications.

Key Gulp Commands Reference

For a comprehensive list of additional Gulp commands available for extension developer tools, refer to the Gulp Command Reference for SuiteCommerce extensions.

Who This Affects

  • Developers: Those involved in creating and deploying SuiteCommerce extensions.
  • Site Administrators: Individuals responsible for managing and maintaining SuiteCommerce environments.

Key Takeaways

  • Use gulp extension:local for testing your extensions locally.
  • Deploy your extensions with gulp extension:deploy to make them available on your NetSuite account.
  • Protect manual edits to manifest.json using --preserve-manifest during deployment.
  • Always fetch the active theme before attempting to deploy an extension.

Source: This article is based on Oracle's official NetSuite documentation.

Frequently Asked Questions (4)

What Gulp command should I use to test a SuiteCommerce extension locally?
To test your SuiteCommerce extension locally, use the `gulp extension:local` command. This command runs a local server and automatically recompiles your extension files whenever changes are made.
What steps are necessary before deploying a SuiteCommerce extension to NetSuite?
Before deploying a SuiteCommerce extension, ensure you have fetched the active theme. Then, access the top-level directory of your extension, and run the `gulp extension:deploy` command. For accounts with specific domains, you may need to include your account number in the command.
How can I prevent data loss of manual changes in the manifest.json during deployment?
To prevent data loss of manual changes in the `manifest.json` file during deployment, use the `--preserve-manifest` option with the `gulp extension:deploy` command. This ensures your manual edits are not overwritten.
What developer roles are impacted by the use of Gulp commands in SuiteCommerce extensions?
Developers involved in creating and deploying SuiteCommerce extensions are primarily impacted, as they utilize Gulp commands for managing extension code. Site administrators responsible for managing SuiteCommerce environments are also affected.
Source: Test and Deploy Your Extension 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 →