mirror of
https://github.com/tcgdex/javascript-sdk.git
synced 2025-06-13 19:39:20 +00:00
feat: Full support for ESM modules
Signed-off-by: Florian BOUILLON <f.bouillon@aptatio.com>
This commit is contained in:
27
package.json
27
package.json
@ -1,9 +1,21 @@
|
||||
{
|
||||
"name": "@tcgdex/sdk",
|
||||
"version": "2.4.9",
|
||||
"main": "./dist/cjs/tcgdex.node.js",
|
||||
"module": "./dist/modules/tcgdex.node.js",
|
||||
"types": "./dist/types/tcgdex.d.ts",
|
||||
"main": "./dist/tcgdex.node.js",
|
||||
"module": "./dist/tcgdex.node.mjs",
|
||||
"types": "./dist/tcgdex.node.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"require": {
|
||||
"types": "./dist/tcgdex.node.d.ts",
|
||||
"default": "./dist/tcgdex.node.js"
|
||||
},
|
||||
"import": {
|
||||
"default": "./dist/tcgdex.node.mjs",
|
||||
"types": "./dist/tcgdex.node.d.mts"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Communicate with the Open Source TCGdex API in Javascript/Typescript using the SDK",
|
||||
"repository": "https://github.com/tcgdex/javascript-sdk.git",
|
||||
"homepage": "https://github.com/tcgdex/javascript-sdk",
|
||||
@ -29,10 +41,10 @@
|
||||
"@types/node-fetch": "^2",
|
||||
"@typescript-eslint/eslint-plugin": "^5",
|
||||
"@typescript-eslint/parser": "^5",
|
||||
"esbuild": "^0.16.3",
|
||||
"eslint": "^8",
|
||||
"jest": "^29",
|
||||
"typescript": "^4"
|
||||
"tsup": "^7",
|
||||
"typescript": "^5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
@ -43,10 +55,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"prebuild": "node scripts/export-version-number.js",
|
||||
"build": "npm run build:cjs && npm run build:browser && npm run build:es2015",
|
||||
"build:cjs": "tsc --project tsconfig.json",
|
||||
"build:es2015": "tsc --project tsconfig.es2015.json",
|
||||
"build:browser": "esbuild ./src/tcgdex.browser.ts --bundle --minify --sourcemap --target=es2016,chrome90,firefox78,safari14,ios13,edge90 --outfile=dist/tcgdex.browser.js",
|
||||
"build": "tsup ./src/tcgdex.node.ts --format cjs,esm --dts --clean && tsup ./src/tcgdex.browser.ts --format iife --minify --sourcemap",
|
||||
"prepublishOnly": "npm run build",
|
||||
"lint": "eslint",
|
||||
"test": "jest --coverage"
|
||||
|
Reference in New Issue
Block a user