Skip to content

Commit

Permalink
imp: adiciona hook que auto gera o dist/index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Euclécio Josias Rodrigues committed Aug 12, 2021
1 parent 4f41892 commit 16782b4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

npm run pack
git add dist/index.js
1 change: 0 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ const minimatch = __webpack_require__(93);
const readFiles = (startPath) => {
if (!fs.existsSync(startPath)) {
console.log('Path does not exist:', startPath);

return [];
}

Expand Down
1 change: 0 additions & 1 deletion findFilesBy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const minimatch = require("minimatch");
const readFiles = (startPath) => {
if (!fs.existsSync(startPath)) {
console.log('Path does not exist:', startPath);

return [];
}

Expand Down
13 changes: 7 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"pack": "ncc build index.js",
"test": "jest",
"test:watch": "jest --watchAll"
"test:watch": "jest --watchAll",
"preinstall": "git config core.hooksPath .githooks"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 16782b4

Please sign in to comment.