This commit is contained in:
peter
2019-08-19 17:05:24 +02:00
parent 43a48d8ad7
commit 5c389f5d18
6 changed files with 6 additions and 66 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ steps:
- git config --global user.email "${DRONE_COMMIT_AUTHOR_EMAIL}" - git config --global user.email "${DRONE_COMMIT_AUTHOR_EMAIL}"
- git config --global user.name "${DRONE_COMMIT_AUTHOR}" - git config --global user.name "${DRONE_COMMIT_AUTHOR}"
- git clone https://gitea.frontblock.me/fb-dist/${DRONE_REPO_NAME}.git - 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} - cd ./${DRONE_REPO_NAME}
- git add -A - git add -A
- git commit -m "drone tagged as version ${DRONE_TAG}" || true - git commit -m "drone tagged as version ${DRONE_TAG}" || true
+2 -2
View File
@@ -1,8 +1,8 @@
FROM node:alpine FROM node:alpine
WORKDIR /service WORKDIR /service
COPY lib /service/lib COPY dist /service/dist
COPY node_modules /service/node_modules COPY node_modules /service/node_modules
EXPOSE 8080 20000 EXPOSE 8080 20000
ENTRYPOINT ["node", "lib/FrontblockAdmin.js"] ENTRYPOINT ["node", "dist/FrontblockAdmin.js"]
+2 -2
View File
@@ -4,7 +4,7 @@
"version": "1.0.0", "version": "1.0.0",
"scripts": { "scripts": {
"tsc": "tsc", "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": "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-backend": "tsc; webpack --display-error-details --config src/backend/webpack.prod.js --progress --colors;",
"build-frontend": "npm run build-dashboard", "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", "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", "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", "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": { "repository": {
"type": "git", "type": "git",
-53
View File
@@ -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),
];
-7
View File
@@ -1,7 +0,0 @@
{
"extends": "./tsconfig.json",
"include": ["src/frontend/**/*"],
"exclude": [
"src/backend"
]
}
+1 -1
View File
@@ -5,7 +5,7 @@
"target": "ESnext", "target": "ESnext",
"module": "commonjs", "module": "commonjs",
"declaration": true, "declaration": true,
"outDir": "./lib", "outDir": "./dist",
"strict": true, "strict": true,
"experimentalDecorators": true "experimentalDecorators": true
}, },