Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Require cartridge resolveNew to Visual Studio Code? Get it now.

Require cartridge resolve

Antonio Marin

|
12,324 installs
| (2) | Free
Provides definitions for Salesforce Commerce Cloud SFRA cartridge requires in your code for quick navigation.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Require Cartridge Resolve

Version Build Status Codacy Badge

Buy Me a Coffee at ko-fi.com

Introduction

Provides definitions for Salesforce Commerce Cloud SFRA require cartridge files in your code for quick navigation and completion.

dw cartridge resolve script cartridge resolve

Features

  • Adds quick navigation and completion features to cartridge script and isml files.
  • Resolves simple cartridge hierarchy.
  • Supports the following statements definitions:
    • require('*/cartridge/...')
    • require('~/cartridge/...') (sitegenesis)
    • require('base/...')
    • require('dw/...') (using "dw-api-types" repository definitions)
    • module.superModule
    • jsDoc @param {dw...} for function parameter types
    • searchquire. See https://www.npmjs.com/package/searchquire.

Usage

Open the folder containing the cartridges you want to work. This extension only resolves the cartridge hierachy inside this folder.

You can navigate to the cartridge file in 2 ways:

  • Set your cursor inside to the cartridge file name string. Wait for resolution (a hover popup will appear with definition info) and click F12.
  • Hold CMD or CTRL key and hover over the cartridge file name. Wait for resolution (a hover popup will appear with definition info) and mouse click. It also will become underlined and it will show the popup with the code lens.

You can also navigate to the cartridge symbols definitions in 2 ways:

  • Set your cursor over a cartridge symbol reference. Wait for resolution (a hover popup will appear with definition info) and click F12.
  • Hold CMD or CTRL key and hover over a cartridge symbol reference. Wait for resolution (a hover popup will appear with definition info) and mouse click. It also will become underlined and it will show the popup with the code lens.

Notes

  • The "dw-api-types" definitions are resolved using git@github.com:SalesforceCommerceCloud/dw-api-types.git repository. Download it to the workspace folder that contains the cartridges.

Changelist

1.8.1

  • Adding support for let and const variable definitions. Thanks to Leonid Taran.
  • Adding example workspace with extension tests.

1.8.0

  • Adding support for searchquire. See https://www.npmjs.com/package/searchquire.

1.7.0

  • Adding support jsDoc @param {dw...} types.

1.6.0

  • Improving provide completion resolution.

1.5.0

  • Adding simple completion symbol support.

1.4.0

  • Adding basic go to symbol support.

1.3.0

  • Adding support for dw-api-types.
  • Adding support for sitegenesis requires.

1.2.0

  • Using code lens for multiple definition results.
  • Implementing hover provider support.
  • Implementing client require statement.
  • Using DefinitionLink interface as definition result.
  • Tests are now executed on travis CI.

1.1.0

  • Adding module.superModule statement definition support.

1.0.0

  • Initial release

Configuration

You can configure this plugin via the "require.cartridge.resolve" properties in your workspace/user preferences.

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft