-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
73 lines (48 loc) · 1.43 KB
/
justfile
File metadata and controls
73 lines (48 loc) · 1.43 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
62
63
64
65
66
67
68
69
70
71
72
73
# List all the available recipes
help:
@just --list --unsorted --list-heading ''
# Test if node_modules directory exists
node_modules:
test -d node_modules || npm install
# Check the types using TypeScript
check-types: node_modules
npx tsc --noEmit
# Format the code using dprint
format: node_modules
npx dprint fmt
# Lint and format the code using ESLint
# Dprint doesn't support all the rules that eslint does,
# so we need to run eslint with the --fix flag to fix the rest.
# - https://github.com/dprint/dprint-plugin-typescript/issues/696
# - https://github.com/dprint/dprint-plugin-typescript/issues/432
npx eslint --ignore-pattern=.gitignore --fix .
alias fmt := format
lint:
npx eslint --ignore-pattern=.gitignore
# Run the unit tests
test-unit: node_modules
npx vitest run
# Run C#'s OpenXmlValidator on the test Docx files
test-docx-files:
cd TestWordFiles && dotnet run
# Run all the tests
test: check-types test-unit
build-esm:
bun build \
--target node \
--outfile dist/index-esm.js \
index.js
build-cjs:
bun build \
--target node \
--format cjs \
--outfile dist/index-cjs.js \
index.js
build-declarations:
npx tsc --project tsconfig.build.json
build: build-esm build-cjs build-declarations
# Instructions on how to release a new version
release: node_modules
@echo '1. npm version minor'
@echo '2. npm publish --access=public'
@echo '3. Update CHANGELOG.md'