Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load custom compare function 350 #351

Merged
merged 3 commits into from
May 7, 2019
Merged

Conversation

bahmutov
Copy link
Owner

@bahmutov bahmutov commented May 7, 2019

You can pass your own NPM modules as pre-compare, compare and store functions using package.json. For example, to use both local and 3rd party NPM modules

{
  "config": {
    "snap-shot-it": {
      "pre-compare": "./pre-compare",
      "compare": "snap-shot-compare",
      "store": "./store"
    }
  }
}

Each NPM module in this case should export a definition of a function that matches the expected core function

@bahmutov bahmutov requested a review from kuceb May 7, 2019 19:10
@bahmutov bahmutov merged commit 273fcea into master May 7, 2019
@bahmutov
Copy link
Owner Author

bahmutov commented May 7, 2019

🎉 This PR is included in version 7.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

custom compare function
1 participant