cx-web v1.40.1
Cx Web is the front-end of the consumer web experience on HomeX.com
Node Versions
The team needs to all be on the same version of node and npm to makes sure the dependency resolution and locking all aligns. Different versions of npm introduce different ways of managing packages, and this leads to bugs.
Current Node Version
12.19.0 LTS
Current NPM Version
6.14.8
Easiest way to stay in line, is to install Node using nvm. Run nvm use
to use the current node version as specified in .nvmrc
.
Browser support
For a list of supported browsers, run the following command:
npx browserslist
Note: IE is not supported. In this scenario, we show a "Browser not supported" page.
Installation
Install necessary dependencies:
npm install
Some dependencies are private packages in npm. To access them, you'll need to be logged into an npm account that is part of the homex organisation.
Run community website in your local env:
npm run dev
Editor Setup
This setup is specific to VSCode, which is our preference because of the built-in support for TypeScript, but other edits like SublimeText and Atom should have similar functionality.
Editor Settings
Please make sure the following settings are enabled: ☑️️ Format on Save
ESLint
Follow instructions here for setting up the ESLint extension in your editor. We already extend the "react-app" ESLint config, so you will only need to setup your .vscode/settings.json
(if using VSCode), and install the ESLint extension. Please make sure the following settings are enabled in the ESLint extension:
☑️️ Auto Fix On Save
☑️️ Enable
Prettier
Install the Prettier extension and make sure the following settings are enabled: ☑️️ Require Config - This will make sure that only projects containing a Prettier config are formatted using Prettier
🚀 Release
Note: You can only create a release if you have privileges to push to master
directly. You must also be running a bash/zsh shell.
Run the following command and follow the on-screen instructions:
npm run deploy
3 years ago