-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (36 loc) · 1.52 KB
/
Makefile
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
DENO_VERSION := v1.18.2
LUME_VERSION := v1.5.1
TAILWINDCSS_CLI_VERSION := v3.0.23
SHELL := $(shell which bash)
TMP := _tmp
BIN := _bin
build: ${BIN}/deno ${BIN}/tailwindcss
PATH="${BIN}:${PATH}" deno run --import-map='import_map.json' -A 'https://deno.land/x/lume@${LUME_VERSION}/ci.ts' -- --import-map='import_map.json'
serve: ${BIN}/deno ${BIN}/tailwindcss
PATH="${BIN}:${PATH}" deno run --import-map='import_map.json' -A 'https://deno.land/x/lume@${LUME_VERSION}/ci.ts' --serve --dev -- --import-map='import_map.json'
ifeq ($(shell uname),Linux)
${BIN}/deno:
[[ -d "${TMP}" ]] || mkdir "${TMP}"
[[ -d "${BIN}" ]] || mkdir "${BIN}"
rm -rf "${TMP}"/*
cd "${TMP}"
jar -xvf <(curl -sL 'https://github.com/denoland/deno/releases/download/${DENO_VERSION}/deno-x86_64-unknown-linux-gnu.zip')
mv deno "${BIN}"
chmod +x "${BIN}/deno"
${BIN}/tailwindcss:
curl -sL 'https://github.com/tailwindlabs/tailwindcss/releases/download/${TAILWINDCSS_CLI_VERSION}/tailwindcss-linux-x64' >"${BIN}/tailwindcss"
chmod +x "${BIN}/tailwindcss"
endif
ifeq ($(shell uname),Darwin)
${BIN}/deno:
[[ -d "${TMP}" ]] || mkdir "${TMP}"
[[ -d "${BIN}" ]] || mkdir "${BIN}"
rm -rf "${TMP}"/*
cd "${TMP}"
jar -xvf <(curl -sL 'https://github.com/denoland/deno/releases/download/${DENO_VERSION}/deno-x86_64-apple-darwin.zip')
mv deno "${BIN}"
chmod +x "${BIN}/deno"
${BIN}/tailwindcss:
curl -sL 'https://github.com/tailwindlabs/tailwindcss/releases/download/${TAILWINDCSS_CLI_VERSION}/tailwindcss-macos-x64' >"${BIN}/tailwindcss"
chmod +x "${BIN}/tailwindcss"
endif