git checkout master
git pull
yarn reset --force
git checkout -b <my_feature_branch>Why: Because you know the code you are building upon has been validated and is as stable as possible. Do not start from another branch unless you absolutely need to.
- Open the component you want to work in directly in your IDE, example with VSCode:
cd packages/smartbot code .
- You can also open the entire project to see all available packages
⚠️ If you open all the entire projet, the VSCode flow plugin will not work correctly
Every component can be built and visualized locally with storybook as long as it has a story (this should be the case if you used the provided generators).
- Run
yarn storybook - In your browser, on the URL: http://localhost:9001/
Detailed page: yarn link
- Run
yarn testfrom the package(s) you modified.
It will check all packages unit tests (Jest), typing (Flow) and linting (EsLint and Prettier)
You can also run yarn test from the project root folder, it will automatically run the tests in all modified packages (but the logs are a bit harder to read in case of an error).
If you encounter a React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. don't forget to run yarn build:watch or yarn build:development because the Jest tests for example use the build.development.js of the dependencies, not the sources!