add webpack for lib
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
[submodule "src/frontend/dashboard"]
|
|
||||||
path = src/frontend/dashboard
|
|
||||||
url = https://gitea.frontblock.me/fb-vendor/dashboard.git
|
|
||||||
|
|||||||
+2
-2
@@ -5,14 +5,14 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"tsc": "tsc",
|
"tsc": "tsc",
|
||||||
"start": "npm run build; node lib/FrontblockAdmin.js",
|
"start": "npm run build; node lib/FrontblockAdmin.js",
|
||||||
"build": "npm run clean; npm run build-backend;",
|
"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",
|
||||||
"build-dashboard": "git submodule init && git submodule update --merge; cd src/frontend/dashboard; npm i && npm run build; cp -r dist/* ../../../static",
|
"build-dashboard": "git submodule init && git submodule update --merge; cd src/frontend/dashboard; npm i && npm run build; cp -r dist/* ../../../static",
|
||||||
"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 --entry ./lib/FrontblockLib.js --output ./FrontblockLib.min.js"
|
"webpack": "webpack --mode production --entry ./lib/FrontblockLib.js --output ./lib/FrontblockLib.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -82,6 +82,10 @@ export class FrontblockAdmin extends ConfigLoader<AdminConf>{
|
|||||||
return {httpPort: 8080}
|
return {httpPort: 8080}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async updateFrontblockLib(){
|
||||||
|
await (new FrontblockCherryPicker("fb-dist/admin", "master", "FrontblockLib.js")).write("./static/FrontblockLib.js")
|
||||||
|
}
|
||||||
|
|
||||||
private async updateDashboard(){
|
private async updateDashboard(){
|
||||||
const dashboard = new GitUpdater("./static")
|
const dashboard = new GitUpdater("./static")
|
||||||
const status = await dashboard.cloneRepo("https://gitea.frontblock.me/fb-dist/dashboard.git", true)
|
const status = await dashboard.cloneRepo("https://gitea.frontblock.me/fb-dist/dashboard.git", true)
|
||||||
@@ -96,6 +100,7 @@ export class FrontblockAdmin extends ConfigLoader<AdminConf>{
|
|||||||
|
|
||||||
private async initialize(){
|
private async initialize(){
|
||||||
await this.updateDashboard()
|
await this.updateDashboard()
|
||||||
|
await this.updateFrontblockLib()
|
||||||
await this.updatePluginmanager()
|
await this.updatePluginmanager()
|
||||||
|
|
||||||
let str = "../plugins/PluginManager/Plugin"
|
let str = "../plugins/PluginManager/Plugin"
|
||||||
|
|||||||
Submodule src/frontend/dashboard deleted from 73c9c973f8
Reference in New Issue
Block a user