Skip to content

Packages ​

Commerce Klaus covers the development loop around SFCC server-side JavaScript: static compatibility checks, cartridge-aware type information, and local module execution.

Project-facing tools ​

PackageUse it for
@commerce-klaus/b2c-pluginRunning Commerce Klaus tools through the Salesforce B2C CLI
@commerce-klaus/eslint-config-sfccRhino compatibility and SFCC-specific correctness rules
@commerce-klaus/typescript-sfccEditor resolution, cartridge typechecking, and generated project types
@commerce-klaus/vitest-sfccSFCC runtime modules and cartridge-aware dependency mocking in Vitest
@commerce-klaus/vite-plugin-sfcc-modulesSFCC module resolution in other Vite-based tooling
@commerce-klaus/babel-plugin-sfcc-modulesSFCC module rewriting in Babel-based pipelines

Shared foundation ​

@commerce-klaus/config provides the public, project-wide configuration contract shared by Commerce Klaus tools.

@commerce-klaus/sfcc-module-resolver is the common Node.js resolution core used by the project-facing packages. It is also public for authors building additional SFCC-aware tools.

@commerce-klaus/sfcc-test-runtime is the framework-independent runtime core used by the Vitest integration. It provides isolated module replacements and focused implementations of common dw/* modules.

What is shared? ​

The packages agree on cartridge order and the meaning of these platform-specific patterns:

js
require("*/cartridge/scripts/example")
require("~/cartridge/scripts/local")
require("app_core/cartridge/scripts/example")

const base = module.superModule

This keeps editor diagnostics, lint rules, typechecks, and local test execution aligned.

Released under the MIT License.