This commit is contained in:
2021-08-26 12:25:33 +00:00
parent 176e069265
commit 53f215e0cb
4 changed files with 60 additions and 1 deletions

View File

@@ -9,7 +9,9 @@ tasks:
publtools_check
cd config
publishtools install
echo ' - do "publishtools run" to run website.'
cd ..
echo ' - do "./run" to run website.'
echo ' - do "./build" to build website, see in build dir'
echo ' - do "open ../workspace.code-workspace" to open all relevant dirs in your editor.'
ports:
- port: 9998

25
build.sh Executable file
View File

@@ -0,0 +1,25 @@
source /home/gitpod/publisher/nvm.sh && nvm use --lts && export PATH=/home/gitpod/publisher/versions/node/v14.17.5/bin:$PATH
set -e
cd /workspace/www_threefold_io
set +e
if [ -f vue.config.js ]; then
npm run-script build
else
gridsome build
fi
set -e
mkdir -p /home/gitpod/publisher/publish/
rsync -ra --delete /workspace/www_threefold_io/dist/ /home/gitpod/publisher/publish//
cd /workspace/www_threefold_io/dist
#echo go to http://localhost:9999/
#python3 -m http.server 9999

19
install.sh Executable file
View File

@@ -0,0 +1,19 @@
source /home/gitpod/publisher/nvm.sh && nvm use --lts && export PATH=/home/gitpod/publisher/versions/node/v14.17.5/bin:$PATH
set -e
cd /workspace/www_threefold_io
rm -f yarn.lock
rm -rf .cache
if [ "true" = "true" ]; then
npm install
rsync -ra --delete node_modules/ /home/gitpod/publisher/node_modules/
else
rsync -ra --delete /home/gitpod/publisher/node_modules/ node_modules/
npm install
fi

13
run.sh Executable file
View File

@@ -0,0 +1,13 @@
source /home/gitpod/publisher/nvm.sh && nvm use --lts && export PATH=/home/gitpod/publisher/versions/node/v14.17.5/bin:$PATH
set -e
cd /workspace/www_threefold_io
if [ -f vue.config.js ]; then
npm run-script serve
else
gridsome develop
fi