UNPKG

@bbc/spartacus

Version:
38 lines (24 loc) 1.81 kB
# SPArtacus A framework to help create both server-side and isomorphic rendering applications. Used by the BBC Articles team in their renderer [simorgh](https://github.com/bbc/simorgh) which creates a single page application. This is a private npm package released on the BBC News npm registry as [`@bbc/spartacus`](https://www.npmjs.com/package/@bbc/spartacus). The default branch of this repo is `latest`. ## Background This was born from a need to make [simorgh](https://github.com/bbc/simorgh) more re-usable cross teams. Therefore, it's intial goal for MVP is to increase sharability by abstracting out re-usable parts of simorgh. In the future this can be improved to allow more flexible setups such as using Sass instead of Styled Components OR bespoke webpack overrides OR even one day rendering something other than React. [Hello world app](https://github.com/pjlee11/hello-world-app) - This application is an example of how `SPArtacus` can be used to create a universal react application. It details the [files needed and how to use this library](https://github.com/pjlee11/hello-world-app/blob/master/README.md#i-want-to-build-an-application-that-uses-SPArtacus). ## Local development If you want to test changes to SPArtacus on your local setup you will need link the application like so: - `cd SPArtacus` - `npm link` - `cd ../{YOUR_APP}` - `npm link ../SPArtacus` // link your application to your local SPArtacus - Your app is now linked with the SPArtacus NB: Each time you make changes to SPArtacus/src you will need to run `npm run build` for YOUR_APP to pick up the new changes. ## Publishing to npm - Build the `lib/` - `npm run build` - Update the package version and change log - Uush branch and create PR - Get 2 reviews - Ensure CI is passing - Merge PR - Run `npm publish`