- Setup is done using React, TS, and webpack, following instructions from January 20, 2021 tutorial by Carl Rippon
- Make sure
yarn
is installed globally:npm install -g yarn
- Run
yarn install
in terminal to install dependencies
- If there arises any issues with
node_modules
try:- delete node_modules:
rm -rf node_modules yarn.lock
- clean cache:
yarn cache clean
- re-install dependencies:
yarn install
- delete node_modules:
- Rules implemented per Oct 2020 article by Ajay Maurya
Archive: Rules have been implemented per Apr 2020 article by Manish Sharma
-
We will try using atomic web design for this set-up template, as referenced by the official React docs
Atoms
(ex. buttons, checkbox) andMolecules'
(ex. Search bar with Search button) components will likely be derived from Bootstrap, so are not referenced in the folder setup. Feel free to add these folders as suitable if creating newatoms
ormolecules
componentsOrganisms
andTemplates'
components may be redundant for simple apps (will assess later if one can be removed). ├── ... ├── src # Main point of entry for React code │ ├── api # Handling of endpoints │ ├── organisms # Ex. Header, Footer │ ├── pages # Ex. dashboard page, inventory page │ ├── shared # global styles, constants, re-useable functions │ └── templates # Ex. DashboardHeader, MobileFooter, WebFooter └── ...
-
We will be using css modules for styling, to avoid run-off from global styles of the same name
- Make sure
yarn
is installed globally:npm install -g yarn
- Navigate to the root of this repo, and run
yarn start
- Navigate to localhost:4000 in your browser to view the application
Hot reloading is enabled
- Make sure to
ctrl + C
out of the terminal when done development, otherwise the application may continue to run in the background (blocking your port) after closing your code editor
- Once satisified with development, run
yarn build
to bundle the files from./src
folder into the./build
folder
- Automation of processes will be done using a makefile using make.js
- Be sure to install make.js globally
npm install -g make