Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Commit

Permalink
Patch preact package.json with typings location
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronjensen committed May 1, 2018
1 parent 2362f06 commit 45af3b7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions other/patch-preact-package-json.js
@@ -0,0 +1,9 @@
const fs = require('fs')
const path = require('path')

const packageJsonPath = path.resolve(__dirname, '..', 'preact', 'package.json')

const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
packageJson.typings = '../typings/preact/glamorous.d.ts'

fs.writeFileSync(packageJsonPath, `${JSON.stringify(packageJson, null, 2)}\n`)
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -13,6 +13,7 @@
"build:main": "kcd-scripts build --bundle --p-react --no-clean",
"build:tiny":
"npm run build:main -- --no-package-json --environment BUILD_TINY",
"postbuild": "node other/patch-preact-package-json.js",
"lint": "kcd-scripts lint",
"test": "kcd-scripts test",
"test:cover": "kcd-scripts test --coverage",
Expand Down

0 comments on commit 45af3b7

Please sign in to comment.