Skip to content

Commit cb48d0a

Browse files
committed
build: bundle dts via api-extractor and move deps to dev only
1 parent 2b34689 commit cb48d0a

29 files changed

+3261
-81
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
/packages/*/node_modules
44
/packages/*/docs
55
/packages/*/lib
6-
/packages/*/ts*/
6+
/packages/*/temp
7+
tsdoc-metadata.json
8+
*.log

api-extractor.base.json

+456
Large diffs are not rendered by default.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
},
1919
"devDependencies": {
2020
"@gltf-transform/core": "^2.4.7",
21+
"@microsoft/api-extractor": "^7.37.0",
2122
"@rollup/plugin-typescript": "^11.0.0",
2223
"@types/jest": "^26.0.15",
2324
"@typescript-eslint/eslint-plugin": "^4.6.1",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3+
"extends": "../../api-extractor.base.json"
4+
}

packages/three-vrm-core/package.json

+4-7
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
"files": [
88
"/lib/",
99
"/ts*/",
10-
"/types/",
1110
"LICENSE"
1211
],
1312
"main": "lib/three-vrm-core.js",
1413
"module": "lib/three-vrm-core.module.js",
15-
"types": "types/index.d.ts",
14+
"types": "lib/three-vrm-core.d.ts",
1615
"repository": {
1716
"type": "git",
1817
"url": "https://github.com/pixiv/three-vrm.git",
@@ -26,7 +25,7 @@
2625
"build": "yarn build-dev && yarn build-prod && yarn build-types",
2726
"build-dev": "cross-env NODE_ENV=development rollup -c",
2827
"build-prod": "cross-env NODE_ENV=production rollup -c",
29-
"build-types": "tsc --declaration --declarationDir ./types --emitDeclarationOnly",
28+
"build-types": "tsc --declaration --declarationDir ./types --emitDeclarationOnly && api-extractor run --local && rimraf types",
3029
"docs": "typedoc --entryPoints ./src/index.ts --out docs",
3130
"test": "jest",
3231
"lint": "eslint \"src/**/*.{ts,tsx}\" && yarn lint-examples && prettier \"src/**/*.{ts,tsx}\" --check",
@@ -39,11 +38,9 @@
3938
"prettier --write"
4039
]
4140
},
42-
"dependencies": {
43-
"@pixiv/types-vrm-0.0": "2.0.6-alpha.2",
44-
"@pixiv/types-vrmc-vrm-1.0": "2.0.6-alpha.2"
45-
},
4641
"devDependencies": {
42+
"@pixiv/types-vrm-0.0": "2.0.6-alpha.2",
43+
"@pixiv/types-vrmc-vrm-1.0": "2.0.6-alpha.2",
4744
"@types/three": "^0.154.0",
4845
"lint-staged": "13.1.2",
4946
"three": "^0.154.0"

packages/three-vrm-core/src/lookAt/VRMLookAt.ts

+1-7
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ export class VRMLookAt {
7373
return this._yaw;
7474
}
7575

76-
/**
77-
* Its current angle around Y axis, in degree.
78-
*/
7976
public set yaw(value: number) {
8077
this._yaw = value;
8178
this._needsUpdate = true;
@@ -93,16 +90,13 @@ export class VRMLookAt {
9390
return this._pitch;
9491
}
9592

96-
/**
97-
* Its current angle around X axis, in degree.
98-
*/
9993
public set pitch(value: number) {
10094
this._pitch = value;
10195
this._needsUpdate = true;
10296
}
10397

10498
/**
105-
* Specifies that angles need to be applied to its [@link applier].
99+
* Specifies that angles need to be applied to its {@link applier}.
106100
*/
107101
protected _needsUpdate: boolean;
108102

0 commit comments

Comments
 (0)