Removing babel and upgrading rollup to v3
This commit is contained in:
parent
f0061827c9
commit
819013fb2f
7 changed files with 206 additions and 2117 deletions
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"presets": [
|
|
||||||
["@babel/preset-env", { "targets": { "node": "current" } }],
|
|
||||||
"@babel/preset-typescript"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
2238
package-lock.json
generated
2238
package-lock.json
generated
File diff suppressed because it is too large
Load diff
17
package.json
17
package.json
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "autobaan",
|
"name": "autobaan",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
"type": "module",
|
||||||
"description": "",
|
"description": "",
|
||||||
"private": true,
|
"private": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
@ -8,8 +9,7 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rm -r ./dist || true",
|
"clean": "rm -r ./dist || true",
|
||||||
"build:requester": "rollup -c src/workers/requester/rollup.config.js",
|
"build:server": "rollup -c src/server/rollup.config.js",
|
||||||
"build:scheduler": "rollup -c src/workers/scheduler/rollup.config.js",
|
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:clear-cache": "jest --clearCache",
|
"test:clear-cache": "jest --clearCache",
|
||||||
"test:clean": "npm run test:clear-cache && npm run test",
|
"test:clean": "npm run test:clear-cache && npm run test",
|
||||||
|
|
@ -27,13 +27,9 @@
|
||||||
"uuid": "^9.0.0"
|
"uuid": "^9.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.19.6",
|
"@rollup/plugin-commonjs": "^23.0.2",
|
||||||
"@babel/preset-env": "^7.19.4",
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||||
"@babel/preset-typescript": "^7.18.6",
|
"@rollup/plugin-typescript": "^9.0.2",
|
||||||
"@rollup/plugin-babel": "^5.3.1",
|
|
||||||
"@rollup/plugin-commonjs": "^21.1.0",
|
|
||||||
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
||||||
"@rollup/plugin-typescript": "^8.5.0",
|
|
||||||
"@types/jest": "^29.0.2",
|
"@types/jest": "^29.0.2",
|
||||||
"@types/mysql": "^2.15.21",
|
"@types/mysql": "^2.15.21",
|
||||||
"@types/puppeteer": "^5.4.7",
|
"@types/puppeteer": "^5.4.7",
|
||||||
|
|
@ -44,7 +40,8 @@
|
||||||
"eslint": "^8.26.0",
|
"eslint": "^8.26.0",
|
||||||
"jest": "^29.2.1",
|
"jest": "^29.2.1",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
"rollup": "^2.79.1",
|
"rollup": "^3.2.5",
|
||||||
|
"rollup-plugin-natives": "^0.7.6",
|
||||||
"typescript": "^4.8.4"
|
"typescript": "^4.8.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
28
src/server/rollup.config.js
Normal file
28
src/server/rollup.config.js
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
// rollup.config.js
|
||||||
|
import path from 'path'
|
||||||
|
|
||||||
|
import typescript from '@rollup/plugin-typescript'
|
||||||
|
import { nodeResolve } from '@rollup/plugin-node-resolve'
|
||||||
|
import commonjs from '@rollup/plugin-commonjs'
|
||||||
|
import natives from 'rollup-plugin-natives'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
input: path.resolve('src/server/index.ts'),
|
||||||
|
output: {
|
||||||
|
file: './dist/server/index.cjs',
|
||||||
|
format: 'cjs',
|
||||||
|
sourcemap: true,
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
typescript(),
|
||||||
|
natives({
|
||||||
|
copyTo: 'dist/libs',
|
||||||
|
destDir: '../libs',
|
||||||
|
dlopen: false,
|
||||||
|
sourcemap: true,
|
||||||
|
targetEsm: true,
|
||||||
|
}),
|
||||||
|
nodeResolve(),
|
||||||
|
commonjs(),
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
// rollup.config.js
|
|
||||||
import path from 'path'
|
|
||||||
|
|
||||||
import typescript from '@rollup/plugin-typescript'
|
|
||||||
import { nodeResolve } from '@rollup/plugin-node-resolve'
|
|
||||||
import commonjs from '@rollup/plugin-commonjs'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
input: path.join(__dirname, 'index.ts'),
|
|
||||||
output: {
|
|
||||||
file: './dist/reservationRequestor/index.js',
|
|
||||||
format: 'cjs',
|
|
||||||
sourcemap: true,
|
|
||||||
},
|
|
||||||
plugins: [typescript({ module: 'esnext' }), nodeResolve(), commonjs()],
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
// rollup.config.js
|
|
||||||
import path from 'path'
|
|
||||||
|
|
||||||
import typescript from '@rollup/plugin-typescript'
|
|
||||||
import { nodeResolve } from '@rollup/plugin-node-resolve'
|
|
||||||
import commonjs from '@rollup/plugin-commonjs'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
input: path.join(__dirname, 'index.ts'),
|
|
||||||
output: {
|
|
||||||
file: './dist/reservationScheduler/index.js',
|
|
||||||
format: 'cjs',
|
|
||||||
sourcemap: true,
|
|
||||||
},
|
|
||||||
plugins: [typescript({ module: 'esnext' }), nodeResolve(), commonjs()],
|
|
||||||
}
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"lib": ["esnext"],
|
"lib": ["esnext"],
|
||||||
"module": "commonjs",
|
"module": "esnext",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"target": "es6",
|
"target": "es6",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue