Skip to content

Commit dbdd82a

Browse files
author
DavertMik
committed
improved loading esm/cjs style modules
1 parent 51c3b3b commit dbdd82a

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

.husky/pre-commit

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
4-
npm run prettier && npm run lint && npm run dtslint
1+
prettier $(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g') --write --ignore-unknown
2+
git update-index --again
3+
npm run lint && npm run dtslint

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@
3939
"json-server:graphql": "node test/data/graphql/index.js",
4040
"lint": "eslint bin/ examples/ lib/ test/ translations/ runok.js",
4141
"lint-fix": "eslint bin/ examples/ lib/ test/ translations/ runok.js --fix",
42-
"prettier": "git diff --name-only --cached --diff-filter=d | grep '\\.js' | xargs npx prettier --write",
43-
"prettier:all": "prettier --config prettier.config.js --write bin/**/*.js lib/**/*.js test/**/*.js translations/**/*.js runok.js",
42+
"prettier": "prettier --config prettier.config.js --write bin/**/*.js lib/**/*.js test/**/*.js translations/**/*.js runok.js",
4443
"docs": "./runok.js docs",
4544
"test:unit": "mocha test/unit --recursive --timeout 10000",
4645
"test:runner": "mocha test/runner --recursive --timeout 10000",
@@ -64,7 +63,7 @@
6463
"update-contributor-faces": "./runok.js contributor:faces",
6564
"types-fix": "node typings/fixDefFiles.js",
6665
"dtslint": "npm run types-fix && tsd",
67-
"prepare": "husky install",
66+
"prepare": "husky",
6867
"prepare-release": "./runok.js versioning && ./runok.js get:commit-log",
6968
"publish-beta": "./runok.js publish:next-beta-version"
7069
},

0 commit comments

Comments
 (0)