From f7347ebb44f48171678444756cf99cbd4e7eaca5 Mon Sep 17 00:00:00 2001 From: Yuan Date: Wed, 13 Dec 2023 16:01:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E5=BE=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/index.d.ts | 2 +- package.json | 1 + rollup.config.ts | 9 +++++++-- yarn.lock | 12 ++++++++++++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/lib/index.d.ts b/lib/index.d.ts index b6157a5..50cf0ef 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1,4 +1,4 @@ -/// +/// export * as GraphicsExtras from '@pixi/graphics-extras'; export * from './app'; export * from './core'; diff --git a/package.json b/package.json index 4152a52..5e66fd0 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "dependencies": { "@pixi/graphics-extras": "^7.3.2", "@pixi/utils": "^7.3.2", + "@rollup/plugin-alias": "^5.1.0", "@stomp/stompjs": "^7.0.0", "eslint": "^8.55.0", "eslint-config-prettier": "^9.1.0", diff --git a/rollup.config.ts b/rollup.config.ts index 97f9ba4..11ee6f1 100644 --- a/rollup.config.ts +++ b/rollup.config.ts @@ -1,5 +1,6 @@ import type { RollupOptions } from 'rollup' import typescript from '@rollup/plugin-typescript' +import alias from '@rollup/plugin-alias' const config: RollupOptions = { @@ -13,13 +14,17 @@ const config: RollupOptions = { ], logLevel: 'debug', plugins: [ + alias({ + entries: [ + { find: 'lib/global', replacement: 'lib/global.d.ts' }, + ] + }), typescript({ - compilerOptions: { declaration: true }, declaration: true, declarationDir: 'lib', include: ['src/**/*'], tsconfig: './tsconfig.json', - }) + }), ], } diff --git a/yarn.lock b/yarn.lock index 2df06b7..891a518 100644 --- a/yarn.lock +++ b/yarn.lock @@ -316,6 +316,13 @@ picocolors "^1.0.0" tslib "^2.6.0" +"@rollup/plugin-alias@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-alias/-/plugin-alias-5.1.0.tgz#99a94accc4ff9a3483be5baeedd5d7da3b597e93" + integrity sha512-lpA3RZ9PdIG7qqhEfv79tBffNaoDuukFDrmhLqg9ifv99u/ehn+lOg30x2zmhf8AQqQUZaMk/B9fZraQ6/acDQ== + dependencies: + slash "^4.0.0" + "@rollup/plugin-typescript@^11.1.5": version "11.1.5" resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-11.1.5.tgz#039c763bf943a5921f3f42be255895e75764cb91" @@ -1618,6 +1625,11 @@ signal-exit@^3.0.3, signal-exit@^3.0.7: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== +slash@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" + integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== + split2@^4.2.0: version "4.2.0" resolved "https://registry.npmmirror.com/split2/-/split2-4.2.0.tgz#c9c5920904d148bab0b9f67145f245a86aadbfa4"