Template folder for creating websites using the React library
esgi-react-template
Template folder for creating websites using the React library.
Requirements
Or
- Docker
- Docker Compose
- GNU/Make (optional)
Why
- Minimal template with only
react
,react-dom
&react-router-dom
- Out-of-the-box router setup for quick prototyping
- Fast development with Vite
- Best practices enforced through ESLint for JavaScript, JSX & React Hooks
- Fast startup with GNU/Make commands
- Vite setup for using Docker Container for easier collaboration
- No magical setup and easily extendable
Docker Compose service startup
Starts the services listed in the docker-compose.yaml file.
GNU/Make
make start
Docker Compose
docker-compose up --detach
NPM
No equivalent.
Docker Compose services shutdown
Stops the services listed in the docker-compose.yaml file.
GNU/Make
make stop
Docker Compose
docker-compose down --remove-orphans --volumes --timeout 0
NPM
No equivalent.
Docker Compose services restart
Restarts the services listed in the docker-compose.yaml
file. This is equivalent to stopping and starting the services.
GNU/Make
make restart
Docker Compose
docker-compose down --remove-orphans --volumes --timeout 0
docker-compose up --detach
NPM
No equivalent.
Node.js dependencies installation
Installs all dependencies listed in the package.json
file. When using make
, this command automatically starts the Docker Compose services for you if not already done.
GNU/Make
make install
Docker Compose
docker-compose exec node npm install
NPM
npm install
Development server startup
Starts the development server at localhost:8000
. When using make
, this command automatically starts the Docker Compose services for you if not already done.
GNU/Make
make development
Docker Compose
docker-compose exec node npm run development
NPM
npm install
npm run development
Code-style issues checking
Check that all files are consistent accordint to the code-style configured in the .eslintrc.js
file. When using make
, this command automatically starts the Docker Compose services for you if not already done.
GNU/Make
make lint
Docker Compose
docker-compose exec node npm run lint
NPM
npm run lint
Node artifacts cleanup
Remove all Node.js and NPM generated files and prepare the folder project to be uploaded. When using make
, this command automatically starts the Docker Compose services for you if not already done.
GNU/Make
make clean
Docker Compose
docker-compose exec node npm run clean
NPM
npm run clean