Skip to content

Commit

Permalink
Provide type definitions for packages
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Jan 8, 2020
1 parent f7b38a9 commit da33e28
Show file tree
Hide file tree
Showing 89 changed files with 454 additions and 54 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
build
build-module
build-style
build-types
node_modules
gutenberg.zip

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,10 @@
"worker-farm": "1.7.0"
},
"scripts": {
"__experimental-build-typedefs": "find packages -name \"tsconfig.json\" -depth 2 -exec ./node_modules/.bin/tsc --checkJs false --project {} \\;",
"prebuild": "npm run check-engines",
"clean:packages": "rimraf ./packages/*/build ./packages/*/build-module ./packages/*/build-style ./packages/*/node_modules",
"prebuild:packages": "npm run clean:packages && lerna run build",
"clean:packages": "rimraf ./packages/*/build ./packages/*/build-module ./packages/*/build-style ./packages/*/build-types ./packages/*/node_modules",
"prebuild:packages": "npm run clean:packages && npm run __experimental-build-typedefs && lerna run build",
"build:packages": "node ./bin/packages/build.js",
"build": "npm run build:packages && wp-scripts build",
"check-engines": "wp-scripts check-engines",
Expand Down
3 changes: 2 additions & 1 deletion packages/a11y/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/a11y/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/annotations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/annotations/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/api-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/api-fetch/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/autop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/autop/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/blob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/blob/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/block-directory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/block-directory/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/block-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/block-editor/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/block-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/block-library/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/blocks/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/components/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/compose/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/compose/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/core-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/core-data/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/data-controls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/data-controls/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/data/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/date/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/date/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/deprecated/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/deprecated/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/dom-ready/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/dom-ready/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/dom/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/edit-post/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/edit-post/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/edit-widgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/edit-widgets/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/editor/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}
3 changes: 2 additions & 1 deletion packages/element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@
},
"publishConfig": {
"access": "public"
}
},
"types": "build-types"
}
8 changes: 8 additions & 0 deletions packages/element/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"files": [ "src/index.js" ],
"compilerOptions": {
"declaration": true,
"declarationDir": "build-types"
}
}

0 comments on commit da33e28

Please sign in to comment.