Skip to content

Commit

Permalink
Support husky and git-lfs together
Browse files Browse the repository at this point in the history
  • Loading branch information
ifiokjr committed Oct 27, 2020
1 parent 2bc5528 commit 74c9d3d
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 21 deletions.
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -106,9 +106,9 @@
"@changesets/changelog-github": "^0.2.7",
"@changesets/cli": "^2.11.1",
"@jest/types": "^26.6.1",
"@lingui/cli": "^3.0.0-18",
"@lingui/macro": "^3.0.0-18",
"@lingui/react": "^3.0.0-18",
"@lingui/cli": "^3.0.0-23",
"@lingui/macro": "^3.0.0-23",
"@lingui/react": "^3.0.0-23",
"@manypkg/cli": "^0.16.1",
"@manypkg/get-packages": "^1.1.1",
"@preconstruct/cli": "^1.1.33",
Expand Down
2 changes: 1 addition & 1 deletion packages/@remirror/i18n/package.json
Expand Up @@ -27,7 +27,7 @@
],
"dependencies": {
"@babel/runtime": "^7.12.0",
"@lingui/core": "^3.0.0-18",
"@lingui/core": "^3.0.0-23",
"@remirror/core-helpers": "1.0.0-next.50",
"make-plural": "^6.2.1"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/@remirror/react-components/package.json
Expand Up @@ -23,13 +23,13 @@
],
"dependencies": {
"@babel/runtime": "^7.12.0",
"@lingui/core": "^3.0.0-18",
"@lingui/core": "^3.0.0-23",
"linaria": "^2.0.0",
"multishift": "1.0.0-next.50",
"type-fest": "^0.18.0"
},
"devDependencies": {
"@lingui/macro": "^3.0.0-18",
"@lingui/macro": "^3.0.0-23",
"@remirror/core": "1.0.0-next.50",
"@remirror/pm": "1.0.0-next.50",
"@remirror/react": "1.0.0-next.50",
Expand Down
4 changes: 2 additions & 2 deletions packages/@remirror/react-social/package.json
Expand Up @@ -22,7 +22,7 @@
],
"dependencies": {
"@babel/runtime": "^7.12.0",
"@lingui/core": "^3.0.0-18",
"@lingui/core": "^3.0.0-23",
"@remirror/extension-auto-link": "1.0.0-next.50",
"@remirror/extension-emoji": "1.0.0-next.50",
"@remirror/extension-events": "1.0.0-next.50",
Expand All @@ -39,7 +39,7 @@
"type-fest": "^0.18.0"
},
"devDependencies": {
"@lingui/macro": "^3.0.0-18",
"@lingui/macro": "^3.0.0-23",
"@remirror/core": "1.0.0-next.50",
"@remirror/pm": "1.0.0-next.50",
"@remirror/react": "1.0.0-next.50",
Expand Down
4 changes: 2 additions & 2 deletions packages/@remirror/react-wysiwyg/package.json
Expand Up @@ -22,7 +22,7 @@
],
"dependencies": {
"@babel/runtime": "^7.12.0",
"@lingui/core": "^3.0.0-18",
"@lingui/core": "^3.0.0-23",
"@remirror/extension-auto-link": "1.0.0-next.50",
"@remirror/i18n": "1.0.0-next.50",
"@remirror/preset-social": "1.0.0-next.50",
Expand All @@ -36,7 +36,7 @@
"type-fest": "^0.18.0"
},
"devDependencies": {
"@lingui/macro": "^3.0.0-18",
"@lingui/macro": "^3.0.0-23",
"@remirror/core": "1.0.0-next.50",
"@remirror/pm": "1.0.0-next.50",
"@remirror/react": "1.0.0-next.50",
Expand Down
20 changes: 10 additions & 10 deletions pnpm-lock.yaml

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

3 changes: 3 additions & 0 deletions support/lfs-hooks/post-checkout
@@ -0,0 +1,3 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.\n"; exit 2; }
git lfs post-checkout "$@"
3 changes: 3 additions & 0 deletions support/lfs-hooks/post-commit
@@ -0,0 +1,3 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-commit.\n"; exit 2; }
git lfs post-commit "$@"
3 changes: 3 additions & 0 deletions support/lfs-hooks/post-merge
@@ -0,0 +1,3 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-merge.\n"; exit 2; }
git lfs post-merge "$@"
3 changes: 3 additions & 0 deletions support/lfs-hooks/pre-push
@@ -0,0 +1,3 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.\n"; exit 2; }
git lfs pre-push "$@"
5 changes: 4 additions & 1 deletion support/root/.huskyrc
@@ -1,6 +1,9 @@
{
"hooks": {
"pre-commit": "pnpm run if-config hooks.preCommit lint-staged",
"pre-push": "pnpm run if-config hooks.prePush \"pnpm checks\""
"post-checkout": "cross-env-shell echo $HUSKY_GIT_STDIN | cross-env-shell sh ./support/lfs-hooks/post-checkout $HUSKY_GIT_PARAMS",
"post-commit": "cross-env-shell echo $HUSKY_GIT_STDIN | cross-env-shell sh ./support/lfs-hooks/post-commit $HUSKY_GIT_PARAMS",
"post-merge": "cross-env-shell echo $HUSKY_GIT_STDIN | cross-env-shell sh ./support/lfs-hooks/post-merge $HUSKY_GIT_PARAMS",
"pre-push": "cross-env-shell echo $HUSKY_GIT_STDIN | cross-env-shell sh ./support/lfs-hooks/pre-push $HUSKY_GIT_PARAMS && pnpm run if-config hooks.prePush \"pnpm checks\""
}
}

0 comments on commit 74c9d3d

Please sign in to comment.