This commit is contained in:
Yuan 2023-12-13 17:16:14 +08:00
parent c18057649b
commit 1ce4626d9a
6 changed files with 26 additions and 7 deletions

1
lib/index.d.ts vendored
View File

@ -1,3 +1,4 @@
/// <reference types="../global" />
export * as GraphicsExtras from '@pixi/graphics-extras'; export * as GraphicsExtras from '@pixi/graphics-extras';
export * from './app'; export * from './app';
export * from './core'; export * from './core';

View File

@ -28,6 +28,7 @@
"pixi.js": "^7.3.2" "pixi.js": "^7.3.2"
}, },
"devDependencies": { "devDependencies": {
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-typescript": "^11.1.5", "@rollup/plugin-typescript": "^11.1.5",
"@types/node": "^12.20.21", "@types/node": "^12.20.21",
"prettier": "^3.1.1", "prettier": "^3.1.1",

View File

@ -1,6 +1,6 @@
import type { RollupOptions } from 'rollup' import type { RollupOptions } from 'rollup'
import typescript from '@rollup/plugin-typescript' import typescript from '@rollup/plugin-typescript'
import alias from '@rollup/plugin-alias' import replace from '@rollup/plugin-replace'
const config: RollupOptions = { const config: RollupOptions = {
@ -14,11 +14,6 @@ const config: RollupOptions = {
], ],
logLevel: 'debug', logLevel: 'debug',
plugins: [ plugins: [
alias({
entries: [
{ find: 'lib/global', replacement: 'lib/global.d.ts' },
]
}),
typescript({ typescript({
declaration: true, declaration: true,
declarationDir: 'lib', declarationDir: 'lib',

View File

@ -1,3 +1,4 @@
/// <reference path="../global.d.ts" />
export * as GraphicsExtras from '@pixi/graphics-extras'; export * as GraphicsExtras from '@pixi/graphics-extras';
export * from './app'; export * from './app';
export * from './core'; export * from './core';

View File

@ -11,7 +11,8 @@
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"isolatedModules": true, "isolatedModules": true,
"lib": ["esnext", "dom"], "lib": ["esnext", "dom"],
"useDefineForClassFields": true "useDefineForClassFields": true,
"noResolve": true
}, },
"include": ["src/**/*.ts", "rollup.config.ts", "global.d.ts"], "include": ["src/**/*.ts", "rollup.config.ts", "global.d.ts"],
"exclude": ["node_modules"] "exclude": ["node_modules"]

View File

@ -58,6 +58,11 @@
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz#e5211452df060fa8522b55c7b3c0c4d1981cb044" resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz#e5211452df060fa8522b55c7b3c0c4d1981cb044"
integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==
"@jridgewell/sourcemap-codec@^1.4.15":
version "1.4.15"
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32"
integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
"@nodelib/fs.scandir@2.1.5": "@nodelib/fs.scandir@2.1.5":
version "2.1.5" version "2.1.5"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
@ -323,6 +328,14 @@
dependencies: dependencies:
slash "^4.0.0" slash "^4.0.0"
"@rollup/plugin-replace@^5.0.5":
version "5.0.5"
resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-5.0.5.tgz#33d5653dce6d03cb24ef98bef7f6d25b57faefdf"
integrity sha512-rYO4fOi8lMaTg/z5Jb+hKnrHHVn8j2lwkqwyS4kTRhKyWOLf2wST2sWXr4WzWiTcoHTp2sTjqUbqIj2E39slKQ==
dependencies:
"@rollup/pluginutils" "^5.0.1"
magic-string "^0.30.3"
"@rollup/plugin-typescript@^11.1.5": "@rollup/plugin-typescript@^11.1.5":
version "11.1.5" version "11.1.5"
resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-11.1.5.tgz#039c763bf943a5921f3f42be255895e75764cb91" resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-11.1.5.tgz#039c763bf943a5921f3f42be255895e75764cb91"
@ -1203,6 +1216,13 @@ lru-cache@^6.0.0:
dependencies: dependencies:
yallist "^4.0.0" yallist "^4.0.0"
magic-string@^0.30.3:
version "0.30.5"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.5.tgz#1994d980bd1c8835dc6e78db7cbd4ae4f24746f9"
integrity sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==
dependencies:
"@jridgewell/sourcemap-codec" "^1.4.15"
merge-stream@^2.0.0: merge-stream@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"