From ed94b5684e03bc16ae92980f254fcb821590bf8f Mon Sep 17 00:00:00 2001 From: Antoine BERNIER Date: Thu, 26 Sep 2024 11:08:34 +0200 Subject: [PATCH] globale types.d.ts --- package.json | 10 ++++------ types.d.ts | 4 ++++ yarn.lock | 5 ----- 3 files changed, 8 insertions(+), 11 deletions(-) create mode 100644 types.d.ts diff --git a/package.json b/package.json index ea75603..8b8fd9e 100644 --- a/package.json +++ b/package.json @@ -2,21 +2,19 @@ "name": "@pmndrs/assets", "version": "0.0.0-semantic-release", "description": "📦 Base64 encoded CC0 assets", - "main": "index.js", "type": "module", + "types": "types.d.ts", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "build": "rm -rf dist && make && npm run ts-declarations && npm run copy", - "ts-declarations": "tsc dist/**/*.js --declaration --allowJs --emitDeclarationOnly --outDir dist --skipLibCheck", - "copy": "copyfiles package.json README.md LICENSE dist && json -I -f dist/package.json -e \"this.private=false; this.devDependencies=undefined; this.optionalDependencies=undefined; this.scripts=undefined; this.husky=undefined; this.prettier=undefined; this.jest=undefined; this['lint-staged']=undefined;\"", + "build": "rm -rf dist && make && npm run copy", + "copy": "copyfiles package.json types.d.ts README.md LICENSE dist && json -I -f dist/package.json -e \"this.private=false; this.devDependencies=undefined; this.optionalDependencies=undefined; this.scripts=undefined; this.husky=undefined; this.prettier=undefined; this.jest=undefined; this['lint-staged']=undefined;\"", "release": "semantic-release" }, "devDependencies": { "@gltf-transform/cli": "^3.4.0", "copyfiles": "^2.3.0", "json": "^11.0.0", - "semantic-release": "^20.1.1", - "typescript": "^5.6.2" + "semantic-release": "^20.1.1" }, "repository": { "type": "git", diff --git a/types.d.ts b/types.d.ts new file mode 100644 index 0000000..790cabd --- /dev/null +++ b/types.d.ts @@ -0,0 +1,4 @@ +declare module '*' { + const src: string + export default src +} diff --git a/yarn.lock b/yarn.lock index a16c901..13792ef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4836,11 +4836,6 @@ type-fest@^3.0.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-3.11.1.tgz#d8e62c7f42e14537d5b8796de5450d541f3a33a7" integrity sha512-aCuRNRERRVh33lgQaJRlUxZqzfhzwTrsE98Mc3o3VXqmiaQdHacgUtJ0esp+7MvZ92qhtzKPeusaX6vIEcoreA== -typescript@^5.6.2: - version "5.6.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0" - integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw== - uglify-js@^3.1.4: version "3.17.4" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c"