1.0.67 • Published 3 years ago
sync-ts v1.0.67
sync-ts
A package for syncing prop types with Typescript types
Install
$ npm i -D
Test
$ npm run test
Run
$ npx sync-ts
Optional Flags
--sourceBranch: string - source branch to compare PR with. default: master
--excludePath: string - paths to exclude
--skip: boolean - optional escape hatch. default: false
Usage examples:
$ npx sync-ts
$ npx sync-ts --sourceBranch='my-branch'
$ npx sync-ts --sourceBranch='my-branch' --excludePath='src/.*/docs/.*' --excludePath='src/.*/examples/.*'
Add tool as a pre-push hook using husky
// package.json
{
"husky": {
"hooks": {
"pre-push": "sync-ts",
}
}
}
Consume in CI
- Add script into npm scripts inside
package.json
- Submit a PR and wait for build to run in CI
- Review build log - in case where prop types and d.ts files are out of sync - build will break and all discrepancies will be logged inside build log.
Example: "prebuild": "if [ \"$agentType\" = \"pullrequest\" ]; then sync-ts; fi"
0.0.0
3 years ago
1.0.67
4 years ago
1.0.66
4 years ago
1.0.65
4 years ago
1.0.64
4 years ago
1.0.63
4 years ago
1.0.62
4 years ago
1.0.61
4 years ago
1.0.60
4 years ago
1.0.59
4 years ago
1.0.58
4 years ago
1.0.57
4 years ago
1.0.56
4 years ago
1.0.55
4 years ago
1.0.54
4 years ago
1.0.53
4 years ago
1.0.52
4 years ago
1.0.51
4 years ago
1.0.50
4 years ago
1.0.49
4 years ago
1.0.48
4 years ago
1.0.47
4 years ago
1.0.46
4 years ago
1.0.45
4 years ago
1.0.44
4 years ago
1.0.43
4 years ago
1.0.42
4 years ago
1.0.41
4 years ago
1.0.40
4 years ago
1.0.39
4 years ago
1.0.38
4 years ago
1.0.37
4 years ago
1.0.36
4 years ago
1.0.35
4 years ago
1.0.34
4 years ago
1.0.33
4 years ago