refactor
This commit is contained in:
parent
bea9d570ad
commit
5064fb6347
@ -1,9 +1,16 @@
|
|||||||
import { build } from 'esbuild'
|
import { build } from 'esbuild'
|
||||||
|
import { umdWrapper } from 'esbuild-plugin-umd-wrapper'
|
||||||
build({
|
build({
|
||||||
entryPoints: ['./src/index.ts'],
|
entryPoints: ['./src/index.ts'],
|
||||||
format: 'esm',
|
bundle: true,
|
||||||
|
format: 'umd',
|
||||||
platform: 'node',
|
platform: 'node',
|
||||||
target: 'node10.4',
|
|
||||||
outdir: './dist',
|
outdir: './dist',
|
||||||
}).then(r => console.log('Successfully build.'))
|
plugins: [
|
||||||
|
umdWrapper({
|
||||||
|
libraryName: 'fw',
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
}).then(() => {
|
||||||
|
console.log('Successfully build. Executing types build...')
|
||||||
|
})
|
||||||
|
@ -7,15 +7,13 @@
|
|||||||
"dist/**/*"
|
"dist/**/*"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node --es-module-specifier-resolution=node build.js",
|
"build": "node --es-module-specifier-resolution=node build.js && pnpm types",
|
||||||
"types": "dts-bundle-generator --config dts.config.json"
|
"types": "dts-bundle-generator --config dts.config.json"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
|
||||||
"rage-fw-shared-types": "workspace:^"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@ragempcommunity/types-client": "^2.1.8",
|
||||||
"rage-rpc": "^0.4.0",
|
"rage-rpc": "^0.4.0",
|
||||||
"@ragempcommunity/types-client": "^2.1.8"
|
"rage-fw-shared-types": "workspace:^"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "SashaGoncharov19",
|
"author": "SashaGoncharov19",
|
||||||
|
@ -25,7 +25,9 @@ class Player {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const fw = {
|
const fw = {
|
||||||
event: new Client(),
|
event: new Client(),
|
||||||
player: new Player(),
|
player: new Player(),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default fw
|
||||||
|
@ -6,10 +6,11 @@
|
|||||||
"@ragempcommunity/types-server": "^2.1.8",
|
"@ragempcommunity/types-server": "^2.1.8",
|
||||||
"dts-bundle-generator": "^9.5.1",
|
"dts-bundle-generator": "^9.5.1",
|
||||||
"esbuild": "^0.21.5",
|
"esbuild": "^0.21.5",
|
||||||
|
"esbuild-plugin-umd-wrapper": "^2.0.0",
|
||||||
|
"lerna": "^8.1.3",
|
||||||
"prettier": "^3.3.1",
|
"prettier": "^3.3.1",
|
||||||
"rage-rpc": "^0.4.0",
|
"rage-rpc": "^0.4.0",
|
||||||
"typescript": "^5.4.5",
|
"typescript": "^5.4.5"
|
||||||
"lerna": "^8.1.3"
|
|
||||||
},
|
},
|
||||||
"type": "module"
|
"type": "module"
|
||||||
}
|
}
|
||||||
|
11223
pnpm-lock.yaml
generated
11223
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,8 @@ import { build } from 'esbuild'
|
|||||||
|
|
||||||
build({
|
build({
|
||||||
entryPoints: ['./src/index.ts'],
|
entryPoints: ['./src/index.ts'],
|
||||||
format: 'esm',
|
bundle: true,
|
||||||
|
format: 'cjs',
|
||||||
platform: 'node',
|
platform: 'node',
|
||||||
target: 'node10.4',
|
target: 'node10.4',
|
||||||
outdir: './dist',
|
outdir: './dist',
|
||||||
|
@ -8,15 +8,13 @@
|
|||||||
"dist/**/*"
|
"dist/**/*"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node --es-module-specifier-resolution=node build.js",
|
"build": "node --es-module-specifier-resolution=node build.js && pnpm types",
|
||||||
"types": "dts-bundle-generator --config dts.config.json"
|
"types": "dts-bundle-generator --config dts.config.json"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
|
||||||
"rage-fw-shared-types": "workspace:^"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@ragempcommunity/types-server": "^2.1.8",
|
||||||
"rage-rpc": "^0.4.0",
|
"rage-rpc": "^0.4.0",
|
||||||
"@ragempcommunity/types-server": "^2.1.8"
|
"rage-fw-shared-types": "workspace:^"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "SashaGoncharov19",
|
"author": "SashaGoncharov19",
|
||||||
|
@ -1,16 +1,14 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ESNext",
|
"target": "ESNext",
|
||||||
|
"lib": ["ESNext","ES2019"],
|
||||||
|
"moduleResolution": "node",
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"strict": true,
|
|
||||||
"allowSyntheticDefaultImports": true,
|
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
|
"strict": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"moduleResolution": "node",
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"declaration": true,
|
|
||||||
"useUnknownInCatchVariables": false,
|
"useUnknownInCatchVariables": false,
|
||||||
"exactOptionalPropertyTypes": true,
|
"exactOptionalPropertyTypes": true,
|
||||||
"typeRoots": [
|
"typeRoots": [
|
||||||
|
Loading…
Reference in New Issue
Block a user