-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaskfile.yaml
More file actions
61 lines (55 loc) · 1.39 KB
/
taskfile.yaml
File metadata and controls
61 lines (55 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
version: "3"
tasks:
npm-update:
dir: swa/
cmds:
- container run --rm -it -v $(pwd):/app -w /app node:24 npm update
astor-upgrade:
dir: api/
cmds:
- container run --rm -it -v $(pwd):/app -w /app node:24 npx @astrojs/upgrade
# Setup node_modules and install dependencies
# This command should be run after starting a new devcontainer or codespaces instance
init-devcontainer:
cmds:
- |
cd {{.TASKFILE_DIR}}/api && \
sudo chown codespace:codespace node_modules && \
npm install
- |
cd {{.TASKFILE_DIR}}/swa && \
sudo chown codespace:codespace node_modules && \
npm install
build:
cmds:
- |
swa build
sleep 1
sources:
- api/**
- swa/**
generates:
- api/dist/**
- api/node_modules/**
- swa/dist/**
- swa/node_modules/**
run-devserver:
deps:
- build
cmds:
- |
PATH="/opt/homebrew/opt/node@18/bin:$PATH"
source .env
swa start \
--app-location {{.TASKFILE_DIR}}/swa/ \
--app-devserver-url http://localhost:4321 \
--api-location {{.TASKFILE_DIR}}/api/ \
--run 'npm run dev'
# Spins up the static web app and the function apps
# No live reloading !!!
run:
cmds:
- |
PATH="/opt/homebrew/opt/node@18/bin:$PATH"
source .env
swa start