ReactJS boilerplate with configuration
- Webpack setup development and production
- Jest and enzyme test setup
- Travis CI integration
- Automatic deploy on surge.sh
- Eslint
- Prettier
Install the dependencies and devDependencies and start the server.
$ cd React-boilerplate
$ yarn install
$ yarn run dev
For production environments...
$ cd React-boilerplate
$ yarn install
$ yarn run build
For run test cases
$ yarn run test
$ yarn run test -u // For any UI change
$ yarn run test:coverage // Check coverage of test cases
$ yarn run test:watch // Watch test cases
VS Code Prettier Configuration
$ "editor.formatOnSave": true,
$ "javascript.editor.formatOnSave": false,
$ Add these lines in .travis.yml file
deploy:
provider: surge
skip_cleanup: true
domain: [domain-name].surge.sh
project: ./build/
on:
branch: master
$ Add Environment variables SURGE_TOKEN and SURGE_LOGIN in surge.sh project settings
Github pages
$ Add these lines in .travis.yml file
deploy:
provider: pages
skip_cleanup: true
local_dir: folder_name/ # or remove this line to upload from root of repo
on:
branch: master
$ Add Environment variables GITHUB_TOKEN in surge.sh project settings
MIT