-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
72 lines (52 loc) · 2.28 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
build: # builds the extension in production mode
${CURDIR}/node_modules/.bin/esbuild ./src/extension.ts --bundle --outfile=dist/main.js --external:vscode --format=cjs --platform=node --minify
build-dev: # builds the extension in dev mode
${CURDIR}/node_modules/.bin/esbuild ./src/extension.ts --bundle --outfile=dist/main.js --external:vscode --format=cjs --platform=node --sourcemap
compile: clean # compiles the extension
echo "compiling ..."
${CURDIR}/node_modules/.bin/tsc -p .
clean: # removes all build artifacts
rm -rf out dist
doc: # runs the documentation tests
${CURDIR}/node_modules/.bin/text-run --format=dot
fix: # auto-corrects all formatting issues
${CURDIR}/node_modules/.bin/eslint . --fix --ext .ts
dprint fmt
${CURDIR}/node_modules/.bin/sort-package-json
help: # shows all available Make commands
cat Makefile | grep '^[^ ]*:' | grep -v '.PHONY' | grep -v '.SILENT' | grep -v help | sed 's/:.*#/#/' | column -s "#" -t
lint: # runs all linters
${CURDIR}/node_modules/.bin/eslint . --ext .ts & \
${CURDIR}/node_modules/.bin/sort-package-json & \
dprint check & \
git diff --check & \
wait
list-shipped-files: # lists all the files that will get shipped in the compiled extension, edit .vscodeignore to change
vsce ls
package: build # package the extension for local installation
vsce package
publish-patch: # publishes a new patch version
vsce publish patch --no-yarn
publish-minor: # publishes a new minor version
vsce publish minor --no-yarn
publish-major: # publishes a new major version
vsce publish major --no-yarn
setup: # prepare this code base for development
yarn install
make --no-print-directory build
test: # runs all the tests
make --no-print-directory build & \
make --no-print-directory doc & \
make --no-print-directory lint & \
make --no-print-directory unit & \
wait
test-ci: build lint unit doc # runs all the tests on ci
unit: compile # runs the unit tests
echo "testing ..."
node out/test/main.js
update: # updates all dependencies
yarn upgrade-interactive --latest
watch: # continuously compiles the source code into a debuggable package
${CURDIR}/node_modules/.bin/esbuild ./src/extension.ts --bundle --outfile=dist/main.js --external:vscode --format=cjs --platform=node --sourcemap --watch
.DEFAULT_GOAL := help
.SILENT: