mirror of
https://github.com/tcgdex/javascript-sdk.git
synced 2025-06-07 16:59:55 +00:00
Moved to ESBuild
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
e172465258
commit
7c253c98d7
1273
package-lock.json
generated
1273
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -28,13 +28,11 @@
|
|||||||
"@types/node-fetch": "^2.5.10",
|
"@types/node-fetch": "^2.5.10",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.28.0",
|
"@typescript-eslint/eslint-plugin": "^4.28.0",
|
||||||
"@typescript-eslint/parser": "^4.28.0",
|
"@typescript-eslint/parser": "^4.28.0",
|
||||||
|
"esbuild": "^0.12.15",
|
||||||
"eslint": "^7.29.0",
|
"eslint": "^7.29.0",
|
||||||
"jest": "^27.0.5",
|
"jest": "^27.0.5",
|
||||||
"ts-loader": "^9.2.3",
|
|
||||||
"ts-node": "^10.0.0",
|
"ts-node": "^10.0.0",
|
||||||
"typescript": "^4.1.3",
|
"typescript": "^4.1.3"
|
||||||
"webpack": "^5.40.0",
|
|
||||||
"webpack-nano": "^1.1.1"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
@ -48,7 +46,7 @@
|
|||||||
"build": "npm run prebuild && npm run build:cjs && npm run build:browser && npm run build:es2015",
|
"build": "npm run prebuild && npm run build:cjs && npm run build:browser && npm run build:es2015",
|
||||||
"build:cjs": "tsc --project tsconfig.json",
|
"build:cjs": "tsc --project tsconfig.json",
|
||||||
"build:es2015": "tsc --project tsconfig.es2015.json",
|
"build:es2015": "tsc --project tsconfig.es2015.json",
|
||||||
"build:browser": "wp --config webpack.config.js",
|
"build:browser": "esbuild ./src/tcgdex.browser.ts --bundle --minify --sourcemap --target=es2016,chrome90,firefox78,safari14,ios13,edge90 --outfile=dist/tcgdex.browser.js",
|
||||||
"prepublishOnly": "npm run build",
|
"prepublishOnly": "npm run build",
|
||||||
"lint": "eslint",
|
"lint": "eslint",
|
||||||
"test": "jest --coverage"
|
"test": "jest --coverage"
|
||||||
|
@ -3,4 +3,4 @@ import unfetch from 'unfetch'
|
|||||||
|
|
||||||
TCGdex.fetch = window.fetch ?? unfetch as any
|
TCGdex.fetch = window.fetch ?? unfetch as any
|
||||||
|
|
||||||
module.exports = TCGdex
|
(global ?? window).TCGdex = TCGdex
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
const path = require('path')
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
mode: 'production',
|
|
||||||
entry: './src/tcgdex.browser.ts',
|
|
||||||
output: {
|
|
||||||
path: path.resolve(__dirname, 'dist'),
|
|
||||||
filename: 'tcgdex.browser.js',
|
|
||||||
libraryTarget: 'umd',
|
|
||||||
library: 'TCGdex',
|
|
||||||
umdNamedDefine: true
|
|
||||||
},
|
|
||||||
resolve: {
|
|
||||||
extensions: ['.ts']
|
|
||||||
},
|
|
||||||
optimization: {
|
|
||||||
minimize: true
|
|
||||||
},
|
|
||||||
module: {
|
|
||||||
rules: [{
|
|
||||||
test: /\.ts$/,
|
|
||||||
loader: 'ts-loader',
|
|
||||||
exclude: /node_modules/,
|
|
||||||
options: {
|
|
||||||
compilerOptions: {
|
|
||||||
sourceMap: false,
|
|
||||||
declaration: false,
|
|
||||||
declarationDir: null,
|
|
||||||
target: 'ES2016'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user