@spring-media/red-sourcepoint-cmp
v0.73.0
Published
CMP (Consent Management Platform) implementation for www.bild.de using the Sourcepoint API
Downloads
553
Readme
Red Sourcepoint CMP
Introduction
This repository covers the implementation of CMP (Consent Management Platform) for www.bild.de by using the Sourcepoint API.
Installation
npm i @spring-media/red-sourcepoint-cmp
Modules
The project is organised into several (mostly) independent modules, that are described below:
Vendor Mapping Module
An API for (hardcoded) mappings of (custom) vendors and purposes and their relations between each other.
TCF-V2 API Module
An (tiny) abstraction layer for the IAB TCF-V2 specs
Sourcepoint Module
An (tiny) abstraction layer for the Sourcepoint API
Embed Utils Module
A collection of utils for handling (social) embeds.
Vue Module
A collection of Vue components for the integration of the API's above.
Playground
The purpose of the playground is to test the feature set of our library (manually and automated) within a browser. It uses the compiled modules from the dist folder to provide two small applications, one for the esm bundle and one for the browser bundle.
Start the playground by running the following command:
npm run playground:start
Some questions are asking the first time, with some predefined sensible default settings.
You can use cli parameters to overwrite internal default values as follows:
npm run playground:start -- --propertyId 1234
The example above sets the default value for propertyId to 1234.
You can also use --yes to skip the questionnaire altogether. In this case, the internal default values (or provided by cli) will be used as the parameters for the playground.
Use a modern browser for testing because the code is not transformed to be compatible with older browsers that do not fully support ES6.
Running automatic end-2-end tests
In addition to manual testing, there is also the option of automatically testing the playground through end-2-end tests.
In order to do so, make sure the playground application is running (npm run playground:start
) and then (in another terminal) run npm run playground:test:e2e
.
The tests use some values from the parameters.json file, which is automatically created in the build directory after the playground has been prepared.
Releasing and Publishing
This repository uses semantic release for automated releasing and publishing to the npm registry and github.
Each release step is configured via release config by configurable plugins.
Semantic-release uses the commit messages to determine the type of changes in the codebase. To automatically determine the next semantic version number and automate publishing the release following commit message format is required:
<type>(<scope>): <subject>
Type
must be one of the following:
- feat: A new feature (minor)
- fix: A bug fix (patch)
- breaking: A breaking change (major)
- revert: When reverting a previous commit (patch)
- perf: A code change that improves performance (patch)
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- chore: Changes to the build process
Scope
The scope could be anything specifying place of the commit change. You can use * when the change affects more than a single scope.
Subject
The subject contains succinct description of the change:
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize first letter