This repo is an opinionated example of how code can be separated out into its own repo, published to Npm, and shared
ReactJS Typescript EmotionJS MicroBundle Jest Storybook + babel, eslint, prettier, husky
This repository is a Github template so you can create a new one from it. Then
yarn
yarn storybook
also
yarn link // so you don't need to publish to test changes remotely
and then
"scripts": {
"build": "microbundle --jsx React.createElement",
"dev": "microbundle watch --jsx React.createElement",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"tsc": "tsc",
"lint": "eslint . --ext .ts",
"test": "jest --watch"
}
Manual publishing steps:
- Ensure your changes are on master
- Ensure you have an Npm account that is authorised for the Npm @guardian organisation
yarn build
yarn publish
(enter new version number, eg. 1.0.1)- Then, in the consuming project, update the version of
@guardian/[YOUR_NAME]s
installed to see the changes