Skip to content

Commit 64a4e5e

Browse files
committed
build: install clang-format from npm
PR-URL: #260 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
1 parent ea06ef5 commit 64a4e5e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ uninstall-linux:
2424

2525
.PHONY: format
2626
format:
27-
clang-format -i src/*
27+
npm run format
2828

2929
# This depends on the system setting e.g. $PATH so can't actually be skipped
3030
.PHONY: configure

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"coverage": "npm run coverage-cc && npm run coverage-js",
2525
"codecov-upload-cc": "codecov --disable=gcov --file=coverage-cc.info",
2626
"codecov-upload-js": "codecov --disable=gcov --file=coverage-js.lcov",
27-
"codecov-upload": "npm run codecov-upload-cc && npm run codecov-upload-js"
27+
"codecov-upload": "npm run codecov-upload-cc && npm run codecov-upload-js",
28+
"format": "clang-format -i src/*"
2829
},
2930
"repository": {
3031
"type": "git",
@@ -54,6 +55,7 @@
5455
"devDependencies": {
5556
"codecov": "^3.1.0",
5657
"nyc": "^13.1.0",
58+
"clang-format": "1.2.4",
5759
"tape": "^4.4.0"
5860
},
5961
"nyc": {

0 commit comments

Comments
 (0)