Skip to content

Commit

Permalink
Merge pull request #172 from cher-ami/v4
Browse files Browse the repository at this point in the history
v4
  • Loading branch information
willybrauner authored Mar 20, 2024
2 parents a56b180 + fb0d30c commit 8490d5d
Show file tree
Hide file tree
Showing 113 changed files with 3,026 additions and 2,360 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,17 @@ on: push
jobs:
build_test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: ['20.x']

steps:
- uses: actions/checkout@v2
- run: node -v
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: 🌎 install dependencies
run: npm ci --unsafe-perm && cd apps/front && npm ci --unsafe-perm
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.17.1
v20.11
16 changes: 4 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1 align="center" style="text-align:center">🪜 chersite</h1>

<p align="center">
chersite is multi apps structure witch include front static-site generator for cher-ami projects
chersite is multi apps structure witch include a SPA/SSG/SSR front framework for cher-ami projects.

<br/>
<br/>
Expand Down Expand Up @@ -30,7 +30,7 @@ Each app has his own `package.json` and `node_modules` folder, we build them sep

### Front app

The front app is a React static-site generator build with [vite](https://vitejs.dev/), [react](https://reactjs.org/),[typescript](https://www.typescriptlang.org/), and [less](https://lesscss.org/), in order to obtain a static server rendering for best performance. The build step prepare a server script, a prerender script and a SPA version to leave choice of use. This one embeds [@cher-ami/router](https://github.com/cher-ami/router) to manage server static props, routes transitions and languages.
The front app is a React SPA/SSG/SSR builder, scaffold with [vite](https://vitejs.dev/), [react](https://reactjs.org/),[typescript](https://www.typescriptlang.org/), and [sass](https://sass-lang.com/) with [@cher-ami/router](https://github.com/cher-ami/router) on top.

See the [front app documentation](apps/front/README.md)

Expand Down Expand Up @@ -124,25 +124,17 @@ Scaffold a new React component called `MyButton` in [apps/front/src/components](
└── src
└── components
└── myButton
|── MyButton.module.less
|── MyButton.module.scss
└── MyButton.tsx
```

Options are defined from [cli/config.js](cli/config.js):

```js
bundleType: ["react", "dom"]
bundleType: ["react"]
componentCompatibleFolders: ["components", "pages"]
```

### back:scaffold-wp

```shell
npm run back:scaffold-wp
```

Scaffold Page, Post type, Option pages for Wordpress.By default, it will create files in `apps/back/web/app/themes/CherAmi/`.

## Scripts

### Update app version
Expand Down
15 changes: 12 additions & 3 deletions apps/front/.env
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
### BASE
# ------------------------------------------------------------------------------ BASE

# base start & end with slash: /{base}/
VITE_APP_BASE=/
# protocol for server: http or https (default: http)
PROTOCOL=http

### DOCKER
# ------------------------------------------------------------------------------ DOCKER

# replace HOST value by your local IP if needed (ex: 192.168.1.52)
HOST=localhost
# fix docker apache port - This value need to be sync with docker compose external port
DOCKER_APACHE_PORT=4321
# docker node port
DOCKER_NODE_PORT=3000
DOCKER_NODE_PORT=5173

# ------------------------------------------------------------------------------ PRERENDER

# port used by exe-prerender-server script
PRERENDER_SERVER_NODE_PORT=1234

# ------------------------------------------------------------------------------ HTACCESS

### BUILD HTACCESS
# Encrypted password
Expand Down
5 changes: 2 additions & 3 deletions apps/front/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Output application depend of project
dist

vendor
.env.local
node_modules
Expand All @@ -12,4 +10,5 @@ dist-ssr
*.local
.cache
vite.config.ts.timestamp*
build-stats.html
stats.html
tsconfig.tsbuildinfo
1 change: 0 additions & 1 deletion apps/front/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
dist
node_modules
src/mixins/mixins.less
index.html
Loading

0 comments on commit 8490d5d

Please sign in to comment.