add Vue UI [wip]

This commit is contained in:
ducklet 2021-07-25 19:01:25 +02:00
parent 3d5656392e
commit b47dfc579b
22 changed files with 2242 additions and 6 deletions

View file

@ -4,4 +4,7 @@ cd "$RUN_DIR"
[ -z "${DEBUG:-}" ] || set -x
exec poetry export -o requirements.txt
poetry export -o requirements.txt
cd unwind-ui
npm run build

View file

@ -4,4 +4,4 @@ cd "$RUN_DIR"
[ -z "${DEBUG:-}" ] || set -x
exec uvicorn unwind:create_app --factory --reload
exec honcho start

7
scripts/dev-server Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh -eu
cd "$RUN_DIR"
[ -z "${DEBUG:-}" ] || set -x
exec uvicorn unwind:create_app --factory --reload

7
scripts/dev-ui Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh -eu
cd "$RUN_DIR"/unwind-ui
[ -z "${DEBUG:-}" ] || set -x
exec npm run dev

View file

@ -1,8 +1,6 @@
#!/bin/sh -eu
cd "$RUN_DIR"
[ -z "${DEBUG:-}" ] || set -x
isort --profile black unwind
black unwind
"$RUN_BIN" lint-js "$@"
"$RUN_BIN" lint-py "$@"

21
scripts/lint-js Executable file
View file

@ -0,0 +1,21 @@
#!/bin/sh -eu
cd "$RUN_DIR"
if [ "${1:-}" = '--fix' ]; then
mode=fix
else
mode=check
fi
if [ "$mode" = 'fix' ]; then
prettier_opts=--write
else
prettier_opts=--check
fi
[ -z "${DEBUG:-}" ] || set -x
cd unwind-ui
npm run lint ||:
npx prettier $prettier_opts 'src/**/*.{js,ts,vue}'

8
scripts/lint-py Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh -eu
cd "$RUN_DIR"
[ -z "${DEBUG:-}" ] || set -x
isort --profile black unwind
black unwind