dist
This commit is contained in:
+1
-1
@@ -43,7 +43,7 @@ steps:
|
||||
- git config --global user.email "${DRONE_COMMIT_AUTHOR_EMAIL}"
|
||||
- git config --global user.name "${DRONE_COMMIT_AUTHOR}"
|
||||
- git clone https://gitea.frontblock.me/fb-dist/${DRONE_REPO_NAME}.git
|
||||
- cp -r ./lib/* ./${DRONE_REPO_NAME}
|
||||
- cp -r ./dist/* ./${DRONE_REPO_NAME}
|
||||
- cd ./${DRONE_REPO_NAME}
|
||||
- git add -A
|
||||
- git commit -m "drone tagged as version ${DRONE_TAG}" || true
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
FROM node:alpine
|
||||
|
||||
WORKDIR /service
|
||||
COPY lib /service/lib
|
||||
COPY dist /service/dist
|
||||
COPY node_modules /service/node_modules
|
||||
|
||||
EXPOSE 8080 20000
|
||||
ENTRYPOINT ["node", "lib/FrontblockAdmin.js"]
|
||||
ENTRYPOINT ["node", "dist/FrontblockAdmin.js"]
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"tsc": "tsc",
|
||||
"start": "npm run build; node lib/FrontblockAdmin.js",
|
||||
"start": "npm run build; node dist/FrontblockAdmin.js",
|
||||
"build": "npm run clean; npm run build-backend; npm run webpack",
|
||||
"build-backend": "tsc; webpack --display-error-details --config src/backend/webpack.prod.js --progress --colors;",
|
||||
"build-frontend": "npm run build-dashboard",
|
||||
@@ -12,7 +12,7 @@
|
||||
"build-widget": "rollup -c src/frontend/widget/rollup.config.js; mkdir -p plugins/PluginManager; cp FrontendPlugin.js plugins/PluginManager",
|
||||
"clean": "rm -rf lib static plugins data conf dist widget .rpt2_cache *.js *.ts src/frontend/dashboard/dist",
|
||||
"update-frontblock": "rm -rf node_modules/frontblock*; npm install",
|
||||
"webpack": "webpack --mode production --entry ./lib/FrontblockLib.js --output ./lib/FrontblockLib.js"
|
||||
"webpack": "webpack --mode production --entry ./dist/FrontblockLib.js --output ./dist/FrontblockLib.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
|
||||
const path = require('path');
|
||||
|
||||
|
||||
const FrontblockLib = {
|
||||
mode: 'production',
|
||||
entry: path.resolve(__dirname, '../../lib/FrontblockLib.js'),
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../../static'),
|
||||
filename: 'FrontblockLib.js',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{ test: /\FrontblockLib.ts/, use: 'ts-loader' }
|
||||
]
|
||||
},
|
||||
optimization: {
|
||||
minimizer: [new TerserPlugin({
|
||||
cache: true,
|
||||
parallel: true,
|
||||
terserOptions:{
|
||||
mangle: false,
|
||||
keep_classnames: true
|
||||
}
|
||||
})],
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
common: {
|
||||
chunks: 'all',
|
||||
minChunks: 2,
|
||||
maxInitialRequests: 5,
|
||||
minSize: 0,
|
||||
name: 'common'
|
||||
},
|
||||
vendor: {
|
||||
test: /node_modules/,
|
||||
chunks: 'all',
|
||||
name: 'vendor',
|
||||
priority: 10,
|
||||
enforce: true,
|
||||
minChunks: 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module.exports = [
|
||||
//Object.assign({}, angularPage),
|
||||
Object.assign({}, FrontblockLib),
|
||||
];
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"include": ["src/frontend/**/*"],
|
||||
"exclude": [
|
||||
"src/backend"
|
||||
]
|
||||
}
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
"target": "ESnext",
|
||||
"module": "commonjs",
|
||||
"declaration": true,
|
||||
"outDir": "./lib",
|
||||
"outDir": "./dist",
|
||||
"strict": true,
|
||||
"experimentalDecorators": true
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user