1.0.67 • Published 4 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
4 years ago
1.0.67
5 years ago
1.0.66
5 years ago
1.0.65
5 years ago
1.0.64
5 years ago
1.0.63
5 years ago
1.0.62
5 years ago
1.0.61
5 years ago
1.0.60
5 years ago
1.0.59
5 years ago
1.0.58
5 years ago
1.0.57
5 years ago
1.0.56
5 years ago
1.0.55
5 years ago
1.0.54
5 years ago
1.0.53
5 years ago
1.0.52
5 years ago
1.0.51
5 years ago
1.0.50
5 years ago
1.0.49
5 years ago
1.0.48
5 years ago
1.0.47
5 years ago
1.0.46
5 years ago
1.0.45
5 years ago
1.0.44
5 years ago
1.0.43
5 years ago
1.0.42
5 years ago
1.0.41
5 years ago
1.0.40
5 years ago
1.0.39
5 years ago
1.0.38
5 years ago
1.0.37
5 years ago
1.0.36
5 years ago
1.0.35
5 years ago
1.0.34
5 years ago
1.0.33
5 years ago