This repository has been archived by the owner on Dec 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(TS): add typescript typings for preact (#416)
* Disable TS emit so we do not need to rimraf * Create separate tsconfig for react * Add typescript typings for preact * Patch preact package.json with typings location * Add myself to contributors
- Loading branch information
1 parent
3f03298
commit f556645
Showing
24 changed files
with
3,594 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,5 @@ test-ts | |
yarn.lock | ||
package-lock.json | ||
.vscode | ||
preact/ | ||
/preact/ | ||
.eslintcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.