File tree Expand file tree Collapse file tree 4 files changed +26
-4
lines changed Expand file tree Collapse file tree 4 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 1+ # Ignore build directories
2+ /build
3+ /cpp /build
4+ /dist
5+
6+ /.github
7+ /.vscode
8+ /screenshots
9+ /* .md
Original file line number Diff line number Diff line change 1- FROM node:alpine AS builder
1+ FROM emscripten/emsdk:4.0.11 AS builder
2+
23WORKDIR '/app'
4+
5+ RUN apt update && apt install -y ninja-build
6+
37COPY . .
4- RUN npm install && npm run build
8+
9+ RUN --mount=type=cache,target=/root/.npm npm install
10+ RUN --mount=type=cache,target=/root/.npm \
11+ --mount=type=cache,target=/app/cpp/build \
12+ npm run setup:wasm
13+ RUN --mount=type=cache,target=/root/.npm \
14+ --mount=type=cache,target=/app/cpp/build \
15+ npm run build:wasm
16+ RUN --mount=type=cache,target=/root/.npm npm run build
517
618FROM nginx:alpine
19+
720COPY --from=builder /app/dist /usr/share/nginx/html
Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.30 )
1+ cmake_minimum_required (VERSION 3.21 )
22
33project (chili-wasm)
44set (CMAKE_CXX_STANDARD 17)
Original file line number Diff line number Diff line change 77 "scripts" : {
88 "dev" : " npx rspack dev" ,
99 "build" : " npx rspack build" ,
10- "build:wasm" : " cd cpp && cmake -- preset release && cmake --build --preset release" ,
10+ "build:wasm" : " cd cpp && cmake -G Ninja -- preset release && cmake --build --preset release --target install " ,
1111 "test" : " node --experimental-vm-modules node_modules/jest/bin/jest.js" ,
1212 "testc" : " node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage" ,
1313 "format" : " npx prettier --write . && npx clang-format --style=Webkit --sort-includes -i ./cpp/src/**" ,
You can’t perform that action at this time.
0 commit comments