dnote/web/scripts/setup.sh
Sung Won Cho 2758923c34
Implement personal knowedge base version (#254)
* Allow to add and edit notes

* Implement search

* Implement settings

* Implement checkout page

* Implement paywall

* Fix inconsistent margin

* Render mobile menu

* Allow to logout

* emails

* Implement user migration

* Always build standalone

* Embed digest in email

* Move browser extension

* Fix test

* Use system font

* Add favicon and app icons

* Make tabbar smaller

* Initialize focus on editor

* Fix various UI audit issues

* Simplify asset serving

* Register sw

* Upgrade deps
2019-09-30 11:02:09 +08:00

21 lines
620 B
Bash
Executable file

#!/usr/bin/env bash
# setup.sh prepares the directory structure and copies static files
set -eux -o pipefail
basePath="$GOPATH/src/github.com/dnote/dnote"
publicPath=$PUBLIC_PATH
compiledPath=$COMPILED_PATH
assetBaseUrl=$ASSET_BASE_URL
# prepare directories
rm -rf "$compiledPath"
rm -rf "$publicPath"
mkdir -p "$compiledPath"
mkdir -p "$publicPath"
# copy the assets and artifacts
cp -r "$basePath"/web/assets/* "$publicPath"
# populate placeholders
assetBaseUrlEscaped=$(echo "$assetBaseUrl" | sed -e 's/[\/&]/\\&/g')
sed -i -e "s/ASSET_BASE_PLACEHOLDER/$assetBaseUrlEscaped/g" "$publicPath"/static/manifest.json