make install
This commit is contained in:
parent
11bdf28d67
commit
abd4299df3
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
/target/
|
/target/
|
||||||
|
/build/
|
||||||
Cargo.lock
|
Cargo.lock
|
8
Makefile.toml
Normal file
8
Makefile.toml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[tasks.install]
|
||||||
|
dependencies = ["build", "member_flow"]
|
||||||
|
|
||||||
|
[tasks.member_flow]
|
||||||
|
run_task = { name = "member_flow", fork = true }
|
||||||
|
|
||||||
|
[env]
|
||||||
|
INSTALL_PATH= "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/build"
|
5
backend/Makefile.toml
Normal file
5
backend/Makefile.toml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[tasks.install]
|
||||||
|
script = '''
|
||||||
|
mkdir -p $INSTALL_PATH
|
||||||
|
cp $CARGO_MAKE_CRATE_TARGET_DIRECTORY/debug/$CARGO_MAKE_CRATE_NAME $INSTALL_PATH
|
||||||
|
'''
|
24
frontend/Makefile.toml
Normal file
24
frontend/Makefile.toml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
[tasks.build]
|
||||||
|
command = "wasm-pack"
|
||||||
|
args = ["build"]
|
||||||
|
|
||||||
|
[tasks.install]
|
||||||
|
dependencies=["install_wasm", "install_static"]
|
||||||
|
|
||||||
|
[tasks.install_wasm]
|
||||||
|
script = '''
|
||||||
|
mkdir -p $FE_WASM_INSTALL_PATH
|
||||||
|
cp -r ./pkg $FE_WASM_INSTALL_PATH
|
||||||
|
|
||||||
|
'''
|
||||||
|
|
||||||
|
[tasks.install_static]
|
||||||
|
script = '''
|
||||||
|
mkdir -p $FE_STATIC_INSTALL_PATH
|
||||||
|
cp www/index.* $FE_STATIC_INSTALL_PATH
|
||||||
|
cp www/bootstrap.js $FE_STATIC_INSTALL_PATH
|
||||||
|
'''
|
||||||
|
|
||||||
|
[env]
|
||||||
|
FE_WASM_INSTALL_PATH="${INSTALL_PATH}/html"
|
||||||
|
FE_STATIC_INSTALL_PATH="${INSTALL_PATH}/html/www"
|
@ -1,4 +1,4 @@
|
|||||||
import { run_app } from '../pkg/webgateway_bg.js';
|
import { run_app } from '../pkg/webgateway_fe_bg.js';
|
||||||
async function main() {
|
async function main() {
|
||||||
run_app();
|
run_app();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user