mns-fe-foundation
Installation and usage
This framework is designed as a set of pluggable modules every project needs in order to start up.
To import the latest version of mns-fe-foundation into you app please run the following command:
npm install --save github:digitalinnovation/mns-fe-foundation
Alternatively, if you are looking for one of the specific versions, run:
npm install --save github:digitalinnovation/mns-fe-foundation#YOUR_VERSION_HERE
How to's for foundation components can be found here: foundation components.
Within our fesk-documentation you can find a variety of articles which will help you to set up various other parts necessary for the M&S.com app to run within our current ecosystem.
Automatic publishing with Semantic Release
The pipeline is configured to use the semantic release tool with the eslint default rules.
Commits Must be in a specific format: <Keyword>: <Your commit message>.
Note keyword is case sensitive.
The following keywords are allowed:
ESLint Rules:
Breaking = Major Release
Fix = Patch Release
Update = Minor Release
New = Minor Release
- When a PR is merged to master the commit messages are analysed and the npm version number is automatically incremented
- This allows better control over the release process
- Commits can be made without necessarily publishing a package to npm
- When we do publish to npm, the version of the published package now accurately reflects the changes made
- When a merge contains multiple commits the highest rule will be used
Manual semantic release
There may be times when you would like to publish a version manually as shown below:
export GH_TOKEN=<String>
export NPM_TOKEN=<String>
npm run semantic-release
These tokens can be retrieved from the vault:
gh-token = mns-fe-foundation.git_token (GitHub auth token)
npm-token = mns-fe-foundation.npm_token (NPM token)
If you would like to test the commit analyser without actually releasing a new version use the --dry-run flag
npm run semantic-release -- --dry-run