Skip to content

Commit ab47bd4

Browse files
Abishek-NewarrhamzehSoulPancake
authored
chore: Added a top-level Makefile in js-sdk to simplify running tests and li… (#277)
* Added a top-level Makefile in js-sdk to simplify running tests and linters * feat: add check target and update all target in Makefile - Added check target that runs lint, test, and audit - Updated all target to include the new check target - Updated help text to reflect changes Closes #272 * Update Makefile more clean make all command Co-authored-by: Raghd Hamzeh <[email protected]> * Update Makefile more clean make check command Co-authored-by: Raghd Hamzeh <[email protected]> --------- Co-authored-by: Raghd Hamzeh <[email protected]> Co-authored-by: Anurag Bandyopadhyay <[email protected]>
1 parent 351b3d0 commit ab47bd4

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

Makefile

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
.PHONY: help install build test lint lint-fix audit clean all
2+
3+
# Default target
4+
help:
5+
@echo "Available targets:"
6+
@echo " make install - Install dependencies"
7+
@echo " make build - Build the project"
8+
@echo " make test - Run tests"
9+
@echo " make lint - Run linter"
10+
@echo " make lint-fix - Run linter with auto-fix"
11+
@echo " make audit - Audit dependencies for vulnerabilities"
12+
@echo " make clean - Clean build artifacts"
13+
@echo " make all - Install, build, lint, check and test"
14+
15+
# Install dependencies
16+
install:
17+
npm ci
18+
19+
# Build the project
20+
build:
21+
npm run build
22+
23+
# Run tests
24+
test:
25+
npm test
26+
27+
# Run linter
28+
lint:
29+
npm run lint
30+
31+
# Check lint, test and audit
32+
check: lint audit test
33+
34+
# Run linter with auto-fix
35+
lint-fix:
36+
npm run lint:fix
37+
38+
# Audit dependencies
39+
audit:
40+
npm audit
41+
42+
# Clean build artifacts
43+
clean:
44+
rm -rf dist/
45+
46+
# Run all checks (install, build, lint, check and test)
47+
all: install build check clean
48+
@echo "All checks passed!"
49+

0 commit comments

Comments
 (0)