Skip to content

Commit 5b47b25

Browse files
authored
feat(dx): add npm scripts for common development tasks (#84)
1 parent 590175b commit 5b47b25

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,17 @@
44
"private": true,
55
"description": "Development dependencies for dtvem - requires Node.js via dtvem",
66
"scripts": {
7-
"prepare": "husky"
7+
"prepare": "husky",
8+
"format": "gofmt -w ./src",
9+
"lint": "golangci-lint run --timeout=5m --config=.golangci.yml ./src/...",
10+
"test": "go test -v ./src/...",
11+
"test:coverage": "go test -v -coverprofile=coverage.out -covermode=atomic ./src/... && go tool cover -html=coverage.out -o coverage.html",
12+
"build": "npm run build:cli && npm run build:shim",
13+
"build:cli": "go build -v -ldflags=\"-s -w\" -o dist/dtvem.exe ./src",
14+
"build:shim": "go build -v -ldflags=\"-s -w\" -o dist/dtvem-shim.exe ./src/cmd/shim",
15+
"install": "npm run build && cp dist/dtvem.exe ~/.dtvem/bin/dtvem.exe && cp dist/dtvem-shim.exe ~/.dtvem/bin/dtvem-shim.exe && ~/.dtvem/bin/dtvem.exe reshim",
16+
"clean": "rm -rf dist coverage.out coverage.html",
17+
"check": "npm run format && npm run lint && npm run test"
818
},
919
"devDependencies": {
1020
"@commitlint/cli": "^19.0.0",

0 commit comments

Comments
 (0)