0.0.7 • Published 2 years ago
@gobizweb/core v0.0.7
GoBizWeb
The core package for frontend dev at gojek.
Features
- React 16.8.0
- ES6 syntax, managed with Prettier + Eslint and Stylelint
- Unit testing via Jest
- Webpack
Install
yarn add @gobizweb/core
Requirements
- Node.js v 12.x or later
- One of the single-spa roots and the artifactory proxy
- VS Code, Atom, or SublimeText have packages / plugins that will work with the configurations
Required IDE Packages / Tools
- Babel (apply to JS / JSX syntax)
- Eslint
- Stylelint
- Prettier
- In VS Code and Atom, enable the integration between Prettier and Eslint / Stylelint in your Editor
- In SublimeText, set the
"auto_format_on_save": true,
flag in JsPrettier settings
- Editorconfig
Deployment
When pushing to the master branch, this code is bundled and published as a npm package on our artifactory, under the @gobizweb/core
name.
Optional Tools
- React Developer Tools (Chrome or Firefox)
Advanced Development
There are a variety of commands and tasks available to use individually if needed. In your terminal, you can run them by running yarn {task_name}
. These are the available tasks:
start
ordev
- Starts the default dev environmentdev:staging
- Runs pointing to a local Apibuild
- Builds the app for production, and drops the artifacts to the/dist
directorybuild-dev
- Builds the app for development and starts the dev serverlint
- Run the suite of eslint and stylelint tests and get a report on errors (if any)lint:eslint
- Run just the eslint tests (JS code)lint:stylelint
- Run just the stylelint tests (CSS / SCSS code)unit-test
- Run the test suite and see result of testsunit-test:coverage
- Run the test suite and generate a coverage reportunit-test:updateSnapshot
- Update all snapshots and re-run the testsunit-test:watch
- Run the test suite inwatch
mode. This is sometimes useful to run in its own terminal window.