Allow to build assets without watching

This commit is contained in:
Sung Won Cho 2022-04-23 13:17:38 +10:00
commit 9cf33a9632
5 changed files with 11 additions and 4 deletions

View file

@ -10,6 +10,8 @@ inputDir="$dir/src"
task="cp $inputDir/main.js $outputDir"
if [[ "$1" == "true" ]]; then
(
cd "$basePath/watcher" && \
go run main.go \
@ -17,3 +19,6 @@ task="cp $inputDir/main.js $outputDir"
--context="$inputDir" \
"$inputDir"
)
else
eval "$task"
fi

View file

@ -9,6 +9,8 @@ inputDir="$dir/src"
rm -rf "${outputDir:?}/*"
sass --version
task="sass \
--style compressed \
--source-map \

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -18,7 +18,7 @@ mkdir -p "$basePath/pkg/server/static"
cp "$basePath"/pkg/server/assets/static/* "$basePath/pkg/server/static"
# run asset pipeline in the background
(cd "$basePath/pkg/server/assets/" && "$basePath/pkg/server/assets/styles/build.sh" true ) &
(cd "$basePath/pkg/server/assets/" && "$basePath/pkg/server/assets/js/build.sh") &
(cd "$basePath/pkg/server/assets/" && "$basePath/pkg/server/assets/js/build.sh" true ) &
# run server
moduleName="github.com/dnote/dnote"