yarn && yarn build
yarn start
npx lerna run build --scope=@crave/farmblocks-packagename
There is a tool to create some initial folders and files for new components:
yarn create-component
Before commiting your patch, please check the new code against existing tests.
yarn test
If you want to keep the tests running in watch mode, you might need to install a Jest dependency watchman.
And then:
yarn test --watch
To run the full test suite and generate a coverage report use:
yarn test --coverage
And open the html generated in coverage/lcov-report/index.html
To update the snapshots use
yarn test -u
You can check for linting errors manually using:
yarn lint .
For the source files, or for the test files:
yarn lint.test .
Or to check for lint errors only on staged files:
yarn lint.staged
But if you have pre-commit set, it will already run linters automatically before commits, see below.
This project use a config file with features that requires pre-commit version bigger than 1.1.0.
If you already have it installed, check the version with:
pre-commit --version
If you dont have it, please install pre-commit on your machine and then setup the git hooks by running:
pre-commit install
Farmblocks uses commitizen to help with the formatting of commit messages,
so instead of doing a git commit
, we ask you to please use the commit
npm script instead:
yarn commit