Commit 4619e9a4 authored by nanahira's avatar nanahira

catchup

parent 83bf6b86
......@@ -23,7 +23,7 @@ upload_to_minio:
tags:
- linux
script:
- aws s3 --endpoint=https://minio.mycard.moe:9000 sync --delete dist/ s3://nanahira/koishi-plugin/limit-help
- aws s3 --endpoint=https://minio.mycard.moe:9000 sync --delete dist/full/ s3://nanahira/koishi-plugin/limit-help
only:
- master
......
This diff is collapsed.
......@@ -5,7 +5,7 @@
"main": "dist/index.js",
"scripts": {
"lint": "eslint --fix .",
"build": "webpack"
"build": "webpack && env PACK_ALL=1 webpack"
},
"repository": {
"type": "git",
......@@ -23,6 +23,9 @@
"dependencies": {
"source-map-support": "^0.5.19"
},
"peerDependencies": {
"koishi": "^4.0.0-beta.2"
},
"devDependencies": {
"@types/node": "^16.4.12",
"@typescript-eslint/eslint-plugin": "^4.29.0",
......@@ -30,7 +33,7 @@
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"koishi": "^4.0.0-alpha.8",
"koishi": "^4.0.0-beta.2",
"prettier": "^2.3.2",
"raw-loader": "^4.0.2",
"ts-loader": "^9.2.5",
......
const path = require("path");
const path = require('path');
const packgeInfo = require('./package.json');
function externalsFromDep() {
return Object.fromEntries(
[
...Object.keys(packgeInfo.dependencies || {}),
...Object.keys(packgeInfo.peerDependencies || {}),
]
.filter((dep) => dep !== 'source-map-support')
.map((dep) => [dep, dep]),
);
}
const packAll = !!process.env.PACK_ALL;
module.exports = {
entry: "./src/index.ts",
mode: "production",
target: "node",
devtool: "source-map",
entry: './src/index.ts',
mode: 'production',
target: 'node',
devtool: 'source-map',
module: {
rules: [
{
test: /\.tsx?$/,
use: "ts-loader",
use: 'ts-loader',
exclude: /node_modules/,
},
{ test: /\.mustache$/, use: "raw-loader" },
{ test: /\.mustache$/, use: 'raw-loader' },
],
},
resolve: {
extensions: [".tsx", ".ts", ".js"],
extensions: ['.tsx', '.ts', '.js'],
},
output: {
filename: "index.js",
filename: 'index.js',
library: {
type: "commonjs",
type: 'commonjs',
},
path: path.resolve(__dirname, "dist"),
path: path.resolve(__dirname, packAll ? 'dist/full' : 'dist'),
},
externals: {
'koishi': 'koishi',
}
koishi: 'koishi',
...(packAll ? {} : externalsFromDep()),
},
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment