Skip to content

Commit

Permalink
Add husky, fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
dprothero committed Jun 13, 2022
1 parent 2881bd0 commit 6c90c18
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
with:
node-version: 16
- run: yarn run ci
- run: yarn run build
- run: yarn test

publish-npm:
Expand Down
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn test
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@twilio-labs/docusaurus-plugin-segment",
"version": "0.1.0",
"version": "0.1.0-pre1",
"description": "Segment plugin for Docusaurus.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand All @@ -10,7 +10,11 @@
"scripts": {
"build": "tsc --build",
"watch": "tsc --build --watch",
"test": "jest"
"test": "jest",
"prepack": "rimraf lib && yarn run build && rimraf lib/src/tests",
"preci": "rm -rf node_modules",
"ci": "yarn install --frozen-lockfile",
"prepare": "husky install"
},
"repository": "https://github.com/twilio-labs/docusaurus-plugin-segment",
"license": "MIT",
Expand All @@ -24,6 +28,7 @@
"@docusaurus/types": "2.0.0-beta.21",
"@types/jest": "^28.1.1",
"@types/segment-analytics": "^0.0.34",
"husky": "^8.0.1",
"jest": "^28.1.1",
"ts-jest": "^28.0.4",
"typescript": "^4.7.3"
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4319,6 +4319,11 @@ human-signals@^2.1.0:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==

husky@^8.0.1:
version "8.0.1"
resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.1.tgz#511cb3e57de3e3190514ae49ed50f6bc3f50b3e9"
integrity sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==

[email protected]:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
Expand Down

0 comments on commit 6c90c18

Please sign in to comment.