To build the SFRA code to a developer sandbox for the first time, which build steps should the developer perform for the site to appear and function as designed?
A.
npm run compile:js, npm run compile:html, npm run clean
B.
npm run compile:js, npm run compile:scss, npm run compile:html
C.
npm run compile:js, npm run compile:scss, npm run compile:fonts
SFRA storefront source contains several types of front-end assets that require preprocessing before the cartridge is deployed for normal use. JavaScript source is compiled or bundled through thecompile:jstask, SCSS source must be transformed into browser-consumable CSS throughcompile:scss, and the required font resources are copied into the generated static asset structure throughcompile:fonts. Therefore, option C represents the appropriate first-time SFRA asset build sequence.
compile:htmlis not part of the standard SFRA storefront asset compilation process. ISML templates are server-side templates and are uploaded as cartridge resources rather than being converted into static HTML by an npm compilation step. Likewise,npm run cleanremoves generated build artifacts; it does not substitute for producing the CSS and font assets required by the storefront.
After the assets and cartridge code are built and uploaded, the cartridges must also be registered through the site ' s cartridge path so that B2C Commerce can resolve and execute them. Salesforce ' s SFRA configuration guidance describes the cartridge deployment and site-registration workflow.
Study Guide reference:Application Development — SFRA project structure, front-end asset compilation, cartridge deployment, and storefront development workflow.
===============
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit