Skip to content

Commit

Permalink
Move pre-commit script to husky.hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
bruceadams committed Aug 15, 2020
1 parent 3ad3fc3 commit 8a90bac
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"scripts": {
"lint": "eslint 'src/**.js' 'tests/**.js' --fix",
"test": "eslint 'src/**.js' 'tests/**.js' && jest --coverage",
"build": "ncc build src/main.js",
"precommit": "npm run build && git add dist/"
"build": "ncc build src/main.js"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -50,5 +49,10 @@
"statements": 80
}
}
},
"husky": {
"hooks": {
"pre-commit": "npm run build && git add dist/"
}
}
}

0 comments on commit 8a90bac

Please sign in to comment.