Skip to content

xtina-starr/pull-lock

Repository files navigation

Pull Lock

Automate tasks that happen on when you pull in new code.

{
  "scripts": {
    "postcheckout": "pull-lock"
  },
  "pull-lock": {
    "yarn.lock": "yarn install",
    "Example/Podfile.lock": ["cd Example", "bundle exec pod install"]
  }
}

Like lint-staged for when you've git pulled. You set up a husky "postcheckout" hook which is passed to the CLI tool pull-lock. pull-lock will then compare the changedfiles to the config and execute commands for you automatically.

Installation and setup

  1. yarn add --dev pull-lock husky
  2. Update your package.json like this:
{
  "scripts": {
+   "postcheckout": "pull-lock"
  },
+ "pull-lock": {
+   "yarn.lock": "yarn install",
+ }
}

Then when you run a git pull, pull-lock will check for yarn.lock inside the diffed files and run the scripts inside your config files.

Advanced config

As pull-lock uses cosmic-config you can leave your app settings in either:

  • a pull-lock object in your package.json
  • a .pulllockrc file in JSON or YML format
  • a pull-lock.config.js file in JS format

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published