Installing and Configuring SFRA Tools

This topic is intended to help you configure the app_storefront_base cartridge and any plugin cartridges you want for your storefront. For information about configuring tools for a custom cartridge, see Adding Custom Cartridges.

Downloading and Installing Development, Debugging, and Deployment Tools

Commerce Cloud provides UX Studio, an Eclipse plugin that provides code development, debugging, and code upload capabilities. It also provides development tools for pipelines, which are still used to create jobs. For this reason, UX Studio is used in all Salesforce B2C Commerce getting started and training examples.

However, you don't have to use UX Studio to edit your code. You can use any JavaScript IDE. For debugging capabilities, you can use one of the community projects or third-party debugger plugins available for your editor of choice.

You also can contribute to the dwdebugger repository, which uses the Script Debugger API to provide debugging capabilities for VSC and node-inspector.

Important: For Storefront Reference Architecture (SFRA), the standard build tools replace the unsupported Community Suite for integration and deployment used with SiteGenesis. The Community Suite doesn't work with SFRA.

If you want to upload your code automatically, use the upload tool included with the sgmf-scripts command-line tools. See also Building SFRA

Getting Started with Eclipse and UX Studio

After installing your development tool, you must also install the command-line build tools for SFRA.

Installing npm Dependencies for SFRA

SFRA depends on modules managed by npm. If you downloaded the repository as a .zip file, these instructions assume that you have expanded it.

  1. Open a command prompt and navigate to the storefront-reference-architecture directory.
  2. Download and install Node.js version 6.x, or later. Earlier versions of node don't work with SFRA functional tests. You can test whether node is installed by entering:
    node -v
    If node is already installed, this command returns a version number. If it's installed, skip to the next step.
    Note: B2C Commerce uses Node.js only for npm dependency management.
  3. Use npm to install the modules included with SFRA. This approach is possible only if you're in the storefront-reference-architecture directory and you installed Node.js.
    npm install
    Important: Run this command any time you download a new version of SFRA, because the dependencies included with the application sometimes change.

Installing SFRA Command-Line Tools

While packages are easy to install globally on most operating systems, it can be complicated to globally install packages on the Mac OS/X. If you're working on a *nix or Window system, we recommend that you install the command-line build tools for SFRA globally. This approach makes it simple to create custom cartridges with the correct structure anywhere on your development machine.
npm install -g sgmf-scripts

After installation, you can use the sgmf-scripts command-line tools in any directory on your machine with a syntax similar to:

sgmf-scripts --help

If you're installing on a Mac and get an EACCES error, try Fixing Your Permissions to globally install the node. Adjust your node installation if necessary. This process can be time-consuming. Global installation isn't necessary, but it eliminates the installation step for any new cartridge.

If you want to install sgmf-scripts locally, enter:

npm install sgmf-scripts
After installation, you can use sgmf-scripts in the current folder with a syntax similar to:
node node_modules/sgmf-scripts --help

Next Step: Building SFRA