Skip to content

Commit 6c90c18

Browse files
committed
Add husky, fix workflows
1 parent 2881bd0 commit 6c90c18

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

.github/workflows/npm-publish.yml

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
with:
1717
node-version: 16
1818
- run: yarn run ci
19-
- run: yarn run build
2019
- run: yarn test
2120

2221
publish-npm:

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
yarn test

package.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@twilio-labs/docusaurus-plugin-segment",
3-
"version": "0.1.0",
3+
"version": "0.1.0-pre1",
44
"description": "Segment plugin for Docusaurus.",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",
@@ -10,7 +10,11 @@
1010
"scripts": {
1111
"build": "tsc --build",
1212
"watch": "tsc --build --watch",
13-
"test": "jest"
13+
"test": "jest",
14+
"prepack": "rimraf lib && yarn run build && rimraf lib/src/tests",
15+
"preci": "rm -rf node_modules",
16+
"ci": "yarn install --frozen-lockfile",
17+
"prepare": "husky install"
1418
},
1519
"repository": "https://github.com/twilio-labs/docusaurus-plugin-segment",
1620
"license": "MIT",
@@ -24,6 +28,7 @@
2428
"@docusaurus/types": "2.0.0-beta.21",
2529
"@types/jest": "^28.1.1",
2630
"@types/segment-analytics": "^0.0.34",
31+
"husky": "^8.0.1",
2732
"jest": "^28.1.1",
2833
"ts-jest": "^28.0.4",
2934
"typescript": "^4.7.3"

yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -4319,6 +4319,11 @@ human-signals@^2.1.0:
43194319
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
43204320
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==
43214321

4322+
husky@^8.0.1:
4323+
version "8.0.1"
4324+
resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.1.tgz#511cb3e57de3e3190514ae49ed50f6bc3f50b3e9"
4325+
integrity sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==
4326+
43224327
43234328
version "0.4.24"
43244329
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"

0 commit comments

Comments
 (0)