From d6c11a334f02722ff6b8c2c5b92c3d4ae871d8e8 Mon Sep 17 00:00:00 2001 From: Igor Gassmann Date: Thu, 18 Jan 2018 14:19:55 -0300 Subject: [PATCH] keeps node_modules up-to-date when yarn.lock changes due to git --- package.json | 6 +++++- yarn.lock | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index dd8d998d5..8c0682b6a 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,9 @@ "build": "yarn compile && electron-builder build", "build:dir": "yarn build -- --dir -c.compression=store -c.mac.identity=null", "postinstall": "electron-builder install-app-deps", + "postmerge": "yarnhook", + "postcheckout": "yarnhook", + "postrewrite": "yarnhook", "precommit": "lint-staged", "lint": "eslint 'src/**/*.{js,jsx}' --fix", "format": "prettier 'src/**/*.{js,jsx,scss,json}' --write" @@ -100,7 +103,8 @@ "prettier": "^1.4.2", "sass-loader": "^6.0.6", "webpack": "^3.10.0", - "webpack-build-notifier": "^0.1.18" + "webpack-build-notifier": "^0.1.18", + "yarnhook": "^0.1.1" }, "resolutions": { "webpack/webpack-sources": "1.0.1" diff --git a/yarn.lock b/yarn.lock index 464678fb4..0c540f5bc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9448,6 +9448,13 @@ yargs@~3.10.0: decamelize "^1.0.0" window-size "0.1.0" +yarnhook@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/yarnhook/-/yarnhook-0.1.1.tgz#6e67757327e6390cb313f371bdc44ded7c5e047b" + dependencies: + execa "^0.8.0" + find-parent-dir "^0.3.0" + yauzl@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005"