Skip to content

Instantly share code, notes, and snippets.

@1natsu172
Created April 10, 2019 07:34
Show Gist options
  • Save 1natsu172/dca6147c271322ff7fc447d41d921bed to your computer and use it in GitHub Desktop.
Save 1natsu172/dca6147c271322ff7fc447d41d921bed to your computer and use it in GitHub Desktop.
A strategy to automatically install @types definitely-typed at postinstall script using "npx typesync"
{
"name": "npm-scripts-fun",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"postinstall": "npx typesync && git diff --exit-code --quiet HEAD package.json || yarn --ignore-scripts"
},
"dependencies": {
"react": "^16.8.6"
},
"devDependencies": {
"@types/react": "^16.8.13"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment