Skip to content

Commit

Permalink
feat(project): update husky to v9
Browse files Browse the repository at this point in the history
  • Loading branch information
ernscht committed Feb 14, 2024
1 parent 88b7509 commit 66c7bd6
Show file tree
Hide file tree
Showing 17 changed files with 83 additions and 153 deletions.
164 changes: 77 additions & 87 deletions package-lock.json

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

Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# if husky config is not in git root<% if (git.project) { %>
cd <%= git.project %> || return<% } else { %>
# cd ./... || return<% } %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"nitro:update": "npm uninstall generator-nitro && npm install generator-nitro@latest --save-dev --save-exact && yo nitro",
"update-dependencies": "npm-check-updates -u --deprecated",
"\n# MISC ------- ": "",
"postinstall": "<% if (git.root) { %>cd <%= git.root %> && husky install <% if (git.project) { %><%= git.project %>/.husky && cd <%= git.project %> <% } %>&& <% } %>npx playwright install && <% if (options.themes) { %>npm rebuild node-sass && <% } %>env-linter<% if (git.root) { %> --hooksInstalled<% } %> --saveExact --dependenciesExactVersion --lts",
"postinstall": "<% if (git.root) { %>cd <%= git.root %> && husky <% if (git.project) { %><%= git.project %>/.husky && cd <%= git.project %> <% } %>&& <% } %>npx playwright install && <% if (options.themes) { %>npm rebuild node-sass && <% } %>env-linter<% if (git.root) { %> --hooksInstalled<% } %> --saveExact --dependenciesExactVersion --lts",
"\n# LINT/TEST ------- ": "",
"check-node-version": "check-node-version --print --package",
"cypress-test": "npm run build && cross-env PORT=8888 NITRO_MODE=test npm-run-all --parallel --race prod:serve cypress-test:open",
Expand Down Expand Up @@ -121,7 +121,7 @@
"generator-nitro": "<%= version %>",
"gulp": "4.0.2",
"html-validate": "7.18.1",
"husky": "8.0.3",
"husky": "9.0.10",
"license-checker": "25.0.1",
"lighthouse": "11.5.0",
"lint-staged": "15.2.2",<% if (options.themes) { %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ Install the project dependencies in the project root:
npm ci
```

On Mac you need to make sure that githooks are executable, e.g.

```
chmod +x .husky/pre-commit
```

## Starting the app

Use
Expand Down
6 changes: 0 additions & 6 deletions packages/generator-nitro/generators/app/templates/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ Run:
npm ci
```

On Mac you need to make sure that githooks are executable:

```
chmod +x .husky/pre-commit
```

and start in development mode

```
Expand Down
3 changes: 0 additions & 3 deletions packages/project-nitro-twig/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# if husky config is not in git root
cd ./packages/project-nitro-twig || return
npx lint-staged
Loading

0 comments on commit 66c7bd6

Please sign in to comment.