tweak installation scripts, add webpack to backend
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
||||
"format": "prettier --write src/",
|
||||
"dev": "npx ts-node-dev src/app.ts",
|
||||
"build": "npx tsc"
|
||||
"build": "webpack && cp package.json ./dist/package.json"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
|
||||
@@ -3,6 +3,7 @@ const NodePolyfillPlugin = require("node-polyfill-webpack-plugin")
|
||||
const nodeExternals = require('webpack-node-externals');
|
||||
|
||||
module.exports = {
|
||||
mode: 'production',
|
||||
entry: './src/app.ts',
|
||||
module: {
|
||||
rules: [
|
||||
@@ -12,13 +13,15 @@ module.exports = {
|
||||
exclude: /node_modules/,
|
||||
},
|
||||
],
|
||||
},
|
||||
}, node: {
|
||||
__dirname: false
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.tsx', '.ts', '.js'],
|
||||
},
|
||||
output: {
|
||||
filename: 'bundle.js',
|
||||
path: path.resolve(__dirname, '../dist'),
|
||||
filename: 'app.js',
|
||||
path: path.resolve(__dirname, './dist'),
|
||||
},
|
||||
plugins: [
|
||||
new NodePolyfillPlugin(),
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#!/bin/bash
|
||||
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
|
||||
|
||||
|
||||
echo ""
|
||||
echo "---"
|
||||
echo "Moving the distributable folder into /srv/gamestats"
|
||||
echo "---"
|
||||
cp -r "$parent_path"/dist /srv/gamestats
|
||||
cp -rf "$parent_path"/dist /srv/gamestats
|
||||
|
||||
echo ""
|
||||
echo "---"
|
||||
|
||||
Reference in New Issue
Block a user