
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
@bloomreach/brx-spartacus-library
Advanced tools
The Bloomreach Spartacus Library enables Bloomreach Content and Discovery capabilities with Spartacus. The Bloomreach Spartacus Library interacts with the following:
Before installing, make sure you have met the following requirements:
It's assumed that you already have working app with @bloomreach/spa-sdk, @bloomreach/ng-sdk and Spartacus installed. If you haven't set up Bloomreach SPA SDK in your app yet, please follow the instructions provided here. To set up Spartacus 5, you can refer to this guide.
For installing the brx-spartacus-library run following command
npm install @bloomreach/brx-spartacus-library
Be aware! For Spartacus to track router events, it's important to use <router-outlet></router-outlet>
in the App.tsx file.
Routes that include parameters in Spartacus configuration should be copied to Routing module in Angular.
Here is an example:
Spartacus configuration in spartacus-configuration.module.ts
.
ConfigModule.withConfig({
routing: {
routes: {
product: { paths: ['product/:productCode'] },
category: { paths: ['category/:categoryCode', 'category'] },
search: { paths: ['search/:query', 'search'] },
login: { paths: ['sign-in'] },
forgotPassword: { paths: ['forgot-password'] },
resetPassword: { paths: ['sign-in/pw/change'] },
register: { paths: ['register'] },
},
},
}),
Routes product/:productCode
, search/:query
, and category/:categoryCode
contain parameters should be copied to Routing module. Product details route should have canActivate: [CmsPageGuard]
as it shown below:
const routes: Routes = [
{ path: 'search/:query', component: BrxComponent },
{ path: 'product/:productCode', canActivate: [CmsPageGuard], component: BrxComponent },
{ path: 'category/:categoryCode', component: BrxComponent },
{ path: '**', component: BrxComponent },
];
In BrPage.tsx
, add Spartacus components from the brx-spartacus-library to mapping as following:
import {
BannerComponent,
SpartacusBannerComponent,
SpartacusLoginFormComponent,
...
} from '@bloomreach/brx-spartacus-library';
mapping = {
Banner: BannerComponent,
SpartacusBanner: SpartacusBannerComponent,
SpartacusLogin: SpartacusLoginFormComponent,
...
}
See brx-spartacus-storefront as reference here.
Your development environment should include the following:
In the root directory of your project run the following commands using NPM:
npm ci
npm run build
Releasing a new version follows the standard angular appraoch for releasing libraries.
npm version
to set a new version in the package.jsonnpm run build
to create the package build in dist/
dist/
run npm publish
If developing this in tandem with the storefront we suggest to use
yalc to publish from the dist/
folder to your local system and yalc link
it in the
storefront app.
Published under Apache 2.0 license.
FAQs
Bloomreach Spartacus Integration Library
The npm package @bloomreach/brx-spartacus-library receives a total of 130 weekly downloads. As such, @bloomreach/brx-spartacus-library popularity was classified as not popular.
We found that @bloomreach/brx-spartacus-library demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.