From 7d6e0e233f2969587c2fd0e4a65e131f030f1ded Mon Sep 17 00:00:00 2001 From: zhl Date: Wed, 3 Feb 2021 11:49:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=93=E5=8C=85=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + boundle.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100755 boundle.sh diff --git a/.gitignore b/.gitignore index 0108ade..7000172 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ node_modules .DS_Store lib dist +target diff --git a/boundle.sh b/boundle.sh new file mode 100755 index 0000000..3d5235c --- /dev/null +++ b/boundle.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +module_path="/data/publish/node_packages/card_svr" +if [ ! -d $module_path ]; then + mkdir -p $module_path +fi +module_sub_path=$module_path"/node_modules" +#if [ ! -d $module_sub_path ]; then + npm install --prefer-offline --loglevel info --unsafe-perm=true --allow-root >> boundle.log + echo 'copy node_modules to /data/publish/node_packages' >> boundle.log + cp -r node_modules $module_sub_path +else + cp -r $module_sub_path ./node_modules +fi + +#npm install --prefer-offline --loglevel info --unsafe-perm=true --allow-root >> boundle.log +#echo 'copy node_modules to /data/publish/node_packages' >> boundle.log +#rm -rf $module_sub_path +#cp -r node_modules $module_sub_path + + +./node_modules/.bin/tsc >> boundle.log + +mkdir target +tar -zcvf ./target/card_svr.tar.gz --exclude=.git --exclude=target --exclude=src ./ +echo 'all done' 2>&1 >> boundle.log