Valid Comm-Dev-101 Dumps shared by ExamDiscuss.com for Helping Passing Comm-Dev-101 Exam! ExamDiscuss.com now offer the newest Comm-Dev-101 exam dumps, the ExamDiscuss.com Comm-Dev-101 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com Comm-Dev-101 dumps with Test Engine here:
A developer needs to update the package.json file so that it points to the hook file for a cartridge, using the hooks keyword. Which snippet works correctly when added to the file?
Correct Answer: A
A cartridge that registers B2C Commerce hooks traditionally uses apackage.jsonfile at the cartridge root and points its " hooks " property to the hook registration file located under the cartridge ' s scripts directory. The correct relative path is therefore: " ./cartridge/scripts/hooks.json " Salesforce ' s SFRA documentation describes the hook-registration pattern as a root-levelpackage. jsonaccompanied byhooks.jsonundercartridge/scripts. The cartridge containing the implementation must also participate in the relevant site ' s cartridge configuration for the extension to be available. Option B is not valid JSON syntax because JSON property names and string values must be quoted. Option C uses the wrong relative location;scriptsis below the cartridge directory, not directly below the package root. Thehooks.jsonfile then maps extension-point names to implementing script modules. Runtime code can invoke those extension points through mechanisms such asHookMgr.callHook(), while the registration metadata tells B2C Commerce which implementation is associated with each hook. Study Guide reference:Application Development - hooks,package.json,hooks.json, extension-point registration, cartridge structure, and extensibility architecture.