From 5fc1f39fd43018d95e3d34f8eb85d0b029586f3a Mon Sep 17 00:00:00 2001 From: Karl Horky Date: Fri, 29 Jan 2021 16:50:44 +0100 Subject: [PATCH 1/2] Add postinstall script to readme Closes #63 --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 41b01ae..92044cd 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,28 @@ Alternatively, you can use a TypeSync config file: `.typesyncrc` or a `"typesync } ``` +## Run TypeSync Automatically After Every Install + +To run TypeSync and install packages automatically after every package install, use a `postinstall` script to your `package.json`: + +```json +{ + "scripts: { + "postinstall": "typesync && npm install" + } +} +``` + +Or, if you use `yarn`: + +```json +{ + "scripts: { + "postinstall": "typesync && yarn" + } +} +``` + # Typings packages TypeSync will add typings for packages that: From e649fa5b5f0b9e413bc4d1cb08498fc38550fc73 Mon Sep 17 00:00:00 2001 From: Karl Horky Date: Fri, 29 Jan 2021 16:51:54 +0100 Subject: [PATCH 2/2] Fix typos --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 92044cd..8a6eb96 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ To run TypeSync and install packages automatically after every package install, ```json { - "scripts: { + "scripts": { "postinstall": "typesync && npm install" } } @@ -81,7 +81,7 @@ Or, if you use `yarn`: ```json { - "scripts: { + "scripts": { "postinstall": "typesync && yarn" } }