Skip to main content

Documentation Portal

Build client CSS & JS files

Before you can run any node npm commands in your terminal you need to install node.js (the latest stable version is recommended). Once node.js is installed, run the following command in your terminal: npm install

This install requires npm packages and modules to build CSS and JS files as well as SGMF (Salesforce B2C Commerce Cloud) scripts.

After npm is installed you can run the following npm commands in your terminal (from top to bottom in package.json)

Run unit tests:

  • npm run test

  • compile CSS for SiteGenesis only

  • npm run compile:scss:sitegenesis

  • compile CSS for SFRA only

  • npm run compile:scss:sfra

  • compile all available CSS in all extension cartridges

  • npm run compile:scss

  • compile js for sitegenesis only

  • npm run compile:js:sitegenesis

  • compile js for SFRA only

  • npm run compile:js:sfra

  • compile all available js in all extension cartridges

  • npm run compile:js

  • lint your CSS

  • npm run lint:css

  • lint your js

  • npm run lint:js