Syncing Changes

Sync local changes to your remote with the command npm run sync

package.json:

"scripts": {
// ...
"validate": "git pull --ff-only && npm i && npm run test && npm run lint",
"stage-local-changes": "doctoc . && npm run prettify && git add .",
"push-local-changes": "git push && git push --tags",
"presync": "npm run validate",
"sync": "npm run stage-local-changes && git commit",
"postsync": "npm run push-local-changes",
// ...
}

Implementation

HaTs projects are pre-configured to run your Testing, Linting, and Style Enforcement CI Tasks before each commit that you execute via npm run sync.

This workflow carries countless benefits, most notably:

  • Your project always maintains a healthy master branch.
  • Resolving merge conflicts is as fast and painless as possible.

Further Reading

Edit this page on GitHub

Happy TypeScript
©2022 👨🏾‍💻 Kamar Mack