Added config for main node package.

feature/typescript
SamTV12345 2023-07-04 22:14:25 +02:00
parent 8ddac2db45
commit 9a3b600666
3 changed files with 3338 additions and 13 deletions

3341
src/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -47,6 +47,7 @@
"formidable": "^2.1.2",
"http-errors": "^2.0.0",
"js-cookie": "^3.0.5",
"npm": "^6.14.18",
"jsdom": "^19.0.0",
"jsonminify": "0.4.2",
"languages4translatewiki": "0.1.3",
@ -107,7 +108,8 @@
"supertest": "^6.3.3",
"typescript": "^4.9.5",
"rollup-plugin-typescript2": "^0.35.0",
"rollup-plugin-copy": "^3.4.0"
"rollup-plugin-copy": "^3.4.0",
"@rollup/plugin-commonjs": "^25.0.2"
},
"engines": {
"node": ">=14.15.0",

View File

@ -2,8 +2,11 @@ const typescript = require('rollup-plugin-typescript2');
const copy = require('rollup-plugin-copy');
const glob = require('glob');
const json = require('@rollup/plugin-json')
const commonJS = require('@rollup/plugin-commonjs')
module.exports = {
input: glob.sync('./node/**/*.ts'), // Matches all TypeScript files in the 'src' directory and its subdirectories
input: './node/server.ts', // Matches all TypeScript files in the 'src' directory and its subdirectories
output: {
preserveModules: true,
dir: './dist',
@ -14,6 +17,7 @@ module.exports = {
typescript({
tsconfig: 'tsconfig.json',
}),
commonJS(),
copy({
targets: [
{src:'./package.json', dest:'./dist'},