-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (35 loc) · 1.23 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
43
44
45
46
help: ## Show this help message
@echo 'usage: make [target] <type> <name>'
@echo
@echo 'Targets:'
@egrep '^(.+)\:\ ##\ (.+)' ${MAKEFILE_LIST} | column -t -c 2 -s ':#'
bundle: ## Create production bundle
rm -rf dist || exit $? ; \
node ./esbuild.js || exit $? ; \
cp: ## Copy files
cp -r index.js examples/h.js || exit $? ; \
cp -r document.js examples/document.js || exit $? ; \
format: ## Enforces a consistent style by parsing your code and re-printing it
npx prettier --write "./**/*.js" "./tests/**/*.js" "./examples/**/*.js" ;\
jsx: ## Build JSX example
node examples/jsx/esbuild-jsx.js || exit $? ;\
ssr: ## Run a static page
node examples/ssr/index.js || exit $? ;\
server: ## Run a dev server
make cp || exit $? ; \
make ssr || exit $? ; \
make jsx || exit $? ; \
pnpm --package=github:gc-victor/d-d dlx d-d || exit $? ; \
test: ## Execute tests
make test-browser || exit $? ; \
make test-ssr || exit $? ; \
test-browser: ## Execute tests
node tests/tests-browser.js || exit $? ;\
test-ssr: ## Execute SSR tests
node tests/tests-ssr.js || exit $? ;\
test-watch: ## Execute tests on watch mode
make test-ssr || exit $? ; \
npx chokidar-cli "**/*.js" -c "make test" || exit $? ;\
# catch anything and do nothing
%:
@: