web static-site generator for cher-ami projects
chersite is multi apps structure witch include a SPA/SSG/SSR front framework for cher-ami projects.
This repo is not a monorepo, it provides standalone apps.
Each app has his own package.json
and node_modules
folder, we build them separately.
apps
└- back ⬅ BO app (api, admin, whatever.)
└- front ⬅ cher-ami frontend starter
The front app is a React SPA/SSG/SSR builder, scaffold with vite, react,typescript, and sass with @cher-ami/router on top.
See the front app documentation
The back app is optional not set by default, it can be API, BO etc.
This guide will help you to install the project on your local machine with docker.
Only the front app is installed by default, so you can start to work on it without any other configuration.
git clone [email protected]:cher-ami/chersite.git && cd chersite
docker compose up
docker compose exec node /bin/bash
npm i
npm run setup
Then, start the dev server:
npm run front:dev
apps/front/.env.local
file with your local IP (useful to access the frontend from other devices):HOST="your local IP"
npm scripts command line interface is available from the main package.json.
Each script can be executed from npm run {task}
command.
npm run setup
Setup
allows a quick and uniform installation between cher-ami projects. It performs several tasks:
.git
and re-init itnpm run front:scaffold
Used to create a new component. Components templates
can be modified according to the needs of the project.
Scaffold a new React component called MyButton
in apps/front/src/components will create:
apps/front
└── src
└── components
└── myButton
|── MyButton.module.scss
└── MyButton.tsx
Options are defined from cli/config.js:
bundleType: ["react"]
componentCompatibleFolders: ["components", "pages"]
To update the app in the root and in the apps/
folder, you can use the ./script/update-app-version.sh
script :
./script/update-version.sh <patch|minor|major>
It will update the version in the package.json
and package-lock.json
files of the root and in the apps/
folder and add a git tag to history.
Developed by cher-ami team.