File tree Expand file tree Collapse file tree 7 files changed +13
-13
lines changed
Expand file tree Collapse file tree 7 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 3636 - name : Install Node modules
3737 run : npm ci --prefer-offline
3838
39- - name : Install spx
40- run : ./install-spx.sh
41-
4239 - name : Run Vue TSC
4340 run : npm run type-check
4441
Original file line number Diff line number Diff line change @@ -25,12 +25,10 @@ FROM ${NODE_BASE_IMAGE} AS frontend-builder
2525WORKDIR /app/spx-gui
2626
2727COPY spx-gui/package.json spx-gui/package-lock.json .
28- ARG NPM_CONFIG_REGISTRY
29- RUN npm install
30-
3128COPY spx-gui/public ./public
3229COPY spx-gui/install-spx.sh .
33- RUN ./install-spx.sh
30+ ARG NPM_CONFIG_REGISTRY
31+ RUN npm install
3432
3533COPY spx-gui .
3634COPY docs ../docs
Original file line number Diff line number Diff line change 99
1010``` bash
1111npm install
12- ./install-spx.sh
1312```
1413
1514## Run the Project in Development Mode
1615
1716``` bash
18- ./build-wasm.sh
1917npm run dev
2018```
2119
Original file line number Diff line number Diff line change 11#! /bin/bash
22set -e
33
4- echo " Run this script from 'spx-gui' directory "
4+ cd " $( dirname " $0 " ) "
55
66# Copy Go wasm_exec.js
77cp -f " $( go env GOROOT) /lib/wasm/wasm_exec.js" src/assets/wasm/wasm_exec.js
88
9-
109# Build and copy spxls.wasm and spxls-pkgdata.zip
1110( cd ../tools/spxls && ./build.sh )
1211cp ../tools/spxls/spxls.wasm src/assets/wasm/spxls.wasm
Original file line number Diff line number Diff line change 11#! /bin/bash
22set -e
33
4+ cd " $( dirname " $0 " ) "
5+
46# Version of spx, keep in sync with the version in `.env`.
57SPX_VERSION=2.0.0-pre.36
68SPX_NAME=" spx_${SPX_VERSION} "
79SPX_FILE_NAME=" ${SPX_NAME} .zip"
810SPX_FILE_URL=" https://github.com/goplus/spx/releases/download/v${SPX_VERSION} /spx_web.zip"
11+ SPX_TARGET_DIR=" ./public/${SPX_NAME} "
12+
13+ if [[ -d " ${SPX_TARGET_DIR} " ]]; then
14+ exit 0
15+ fi
916
1017wget -O " ${SPX_FILE_NAME} " " ${SPX_FILE_URL} "
11- unzip -o " ${SPX_FILE_NAME} " -d " ./public/ ${SPX_NAME }"
18+ unzip -o " ${SPX_FILE_NAME} " -d " ${SPX_TARGET_DIR }"
1219rm " ${SPX_FILE_NAME} "
Original file line number Diff line number Diff line change 44 "private" : true ,
55 "type" : " module" ,
66 "scripts" : {
7+ "postinstall" : " ./install-spx.sh" ,
8+ "predev" : " ./install-spx.sh && ./build-wasm.sh" ,
79 "dev" : " vite" ,
810 "build" : " vue-tsc --build --force && vite build --mode ${NODE_ENV:-production}" ,
911 "preview" : " vite preview" ,
Original file line number Diff line number Diff line change @@ -11,4 +11,3 @@ tar -C /usr/local -xzf ./go1.24.4.linux-amd64.tar.gz
1111/usr/local/go/bin/go version
1212
1313npm install
14- ./install-spx.sh
You can’t perform that action at this time.
0 commit comments