Auto stash before revert of "gitflow-feature-stash: init-template"
parent
1f52295d46
commit
fd8618acc1
|
@ -0,0 +1,4 @@
|
||||||
|
node_modules
|
||||||
|
.env
|
||||||
|
dist
|
||||||
|
yarn.lock
|
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
"name": "nodejs-typescript-webpack",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"main": "index.js",
|
||||||
|
"repository": "git@ssh.techio.dev:template/nodejs-typescript-webpack.git",
|
||||||
|
"author": "naicoi <naicoi@lttech.vn>",
|
||||||
|
"license": "MIT",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "pm2-runtime pm2.development.json",
|
||||||
|
"build": "webpack"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@tsconfig/node18": "1.0.1",
|
||||||
|
"@types/node": "18.15.3",
|
||||||
|
"copy-webpack-plugin": "11.0.0",
|
||||||
|
"pm2": "5.3.0",
|
||||||
|
"ts-loader": "9.4.2",
|
||||||
|
"ts-node": "10.9.1",
|
||||||
|
"typescript": "4.9.5",
|
||||||
|
"webpack": "5.75.0",
|
||||||
|
"webpack-cli": "5.0.1",
|
||||||
|
"webpack-node-externals": "3.0.0"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"apps": [
|
||||||
|
{
|
||||||
|
"name": "development",
|
||||||
|
"script": "./src/index.ts",
|
||||||
|
"watch": ["src"],
|
||||||
|
"exec_mode": "fork",
|
||||||
|
"watch_delay": 1000,
|
||||||
|
"ignore_watch": ["node_modules", "prisma"],
|
||||||
|
"env": {
|
||||||
|
"NODE_ENV": "development"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"apps": [
|
||||||
|
{
|
||||||
|
"name": "nodejs-typescript-webpack",
|
||||||
|
"script": "main.js",
|
||||||
|
"instances": "max",
|
||||||
|
"exec_mode": "cluster",
|
||||||
|
"max_memory_restart": "1G",
|
||||||
|
"env": {
|
||||||
|
"NODE_ENV": "production"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
process.on("SIGINT", function () {
|
||||||
|
console.log(`SIGINT`);
|
||||||
|
});
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"extends": "@tsconfig/node18/tsconfig.json",
|
||||||
|
"include": ["./src/**/*.ts"],
|
||||||
|
"exclude": ["./node_modules"]
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
const nodeExternals = require("webpack-node-externals");
|
||||||
|
const path = require("path");
|
||||||
|
const CopyPlugin = require("copy-webpack-plugin");
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
entry: "./src/index.ts",
|
||||||
|
mode: "production",
|
||||||
|
target: "node",
|
||||||
|
module: {
|
||||||
|
rules: [{ test: /\.ts$/, use: ["ts-loader"], exclude: /node_modules/ }],
|
||||||
|
},
|
||||||
|
resolve: {
|
||||||
|
extensions: [".ts"],
|
||||||
|
},
|
||||||
|
externalsPresets: { node: true },
|
||||||
|
externals: [nodeExternals()],
|
||||||
|
output: {
|
||||||
|
clean: true,
|
||||||
|
filename: "main.js",
|
||||||
|
path: path.resolve(__dirname, "dist"),
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
new CopyPlugin({
|
||||||
|
patterns: [
|
||||||
|
{
|
||||||
|
from: path.resolve(__dirname, "production.json"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
from: path.resolve(__dirname, "package.json"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
from: path.resolve(__dirname, "yarn.lock"),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = config;
|
Loading…
Reference in New Issue