Skip to content

Commit

Permalink
feat: Publish articles and works in build and start script
Browse files Browse the repository at this point in the history
  • Loading branch information
parksb committed Sep 21, 2020
1 parent 7c1916d commit 97e7da6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion tools/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ echo -e "> [-d ${DIST} ] || mkdir ${DIST}\n"
echo -e "\n${GREEN}Publish the templates...${WHITE}"
echo "> ts-node ./tools/publish.ts page"
ts-node ./tools/publish.ts page
echo "> ts-node ./tools/publish.ts article"
ts-node ./tools/publish.ts article
echo "> ts-node ./tools/publish.ts work"
ts-node ./tools/publish.ts work

echo -e "\n${GREEN}Reset distribution directory...${WHITE}"
echo "> rm -r ${DIST}/*"
Expand All @@ -39,4 +43,4 @@ echo -e "\n${GREEN}Run parcel...${WHITE}"
echo -e "> parcel build ./app/public/index.html -d ${DIST}\n"
parcel build ./app/public/index.html -d $DIST

echo -e "\n${CYAN}Done!${WHITE}"
echo -e "\n${CYAN}Done!${WHITE}"
6 changes: 5 additions & 1 deletion tools/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@ echo -e "> [-d server ] || mkdir server\n"
echo -e "\n${GREEN}Publish the templates...${WHITE}"
echo "> ts-node ./tools/publish.ts page"
ts-node ./tools/publish.ts page
echo "> ts-node ./tools/publish.ts article"
ts-node ./tools/publish.ts article
echo "> ts-node ./tools/publish.ts work"
ts-node ./tools/publish.ts work

echo -e "\n${GREEN}Reset server directory...${WHITE}"
echo "> rm -r ./server/*"
rm -r ./server/*

echo -e "\n${GREEN}Run parcel...${WHITE}"
echo -e "> parcel serve ./app/public/index.html -d ./server --open\n"
parcel serve ./app/public/index.html -d ./server --open
parcel serve ./app/public/index.html -d ./server --open

0 comments on commit 97e7da6

Please sign in to comment.