增加打包脚本
This commit is contained in:
parent
daf60e664a
commit
7d6e0e233f
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ node_modules
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
lib
|
lib
|
||||||
dist
|
dist
|
||||||
|
target
|
||||||
|
26
boundle.sh
Executable file
26
boundle.sh
Executable file
@ -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
|
Loading…
x
Reference in New Issue
Block a user