From 56505dacdd1befbd8c6b2505725b753472b6c715 Mon Sep 17 00:00:00 2001 From: hexxa Date: Sun, 17 Apr 2022 12:31:29 +0800 Subject: [PATCH] fix(build): update built files to output js to new place --- scripts/copy_js.sh | 6 +-- scripts/copy_js_dev.sh | 6 +-- .../build/template/index.template.dev.html | 52 +++++++++---------- .../web/build/template/index.template.html | 52 +++++++++---------- src/client/web/src/components/pane_admin.tsx | 2 +- src/client/web/webpack.app.dev.js | 9 ---- src/client/web/webpack.app.prod.js | 9 ---- src/client/web/webpack.common.js | 9 ++++ 8 files changed, 68 insertions(+), 77 deletions(-) diff --git a/scripts/copy_js.sh b/scripts/copy_js.sh index 537f88d..ec6617d 100644 --- a/scripts/copy_js.sh +++ b/scripts/copy_js.sh @@ -2,6 +2,6 @@ set -o nounset errexit export ROOT=`pwd` -cp $ROOT/node_modules/immutable/dist/immutable.min.js $ROOT/public/static/js/ -cp $ROOT/node_modules/react-dom/umd/react-dom.production.min.js $ROOT/public/static/js/ -cp $ROOT/node_modules/react/umd/react.production.min.js $ROOT/public/static/js +cp $ROOT/node_modules/immutable/dist/immutable.min.js $ROOT/static/public/js/ +cp $ROOT/node_modules/react-dom/umd/react-dom.production.min.js $ROOT/static/public/js/ +cp $ROOT/node_modules/react/umd/react.production.min.js $ROOT/static/public/js diff --git a/scripts/copy_js_dev.sh b/scripts/copy_js_dev.sh index 144d6ca..6a318af 100644 --- a/scripts/copy_js_dev.sh +++ b/scripts/copy_js_dev.sh @@ -2,6 +2,6 @@ set -o nounset errexit export ROOT=`pwd` -cp $ROOT/node_modules/immutable/dist/immutable.min.js $ROOT/public/static/js/ -cp $ROOT/node_modules/react-dom/umd/react-dom.development.js $ROOT/public/static/js/ -cp $ROOT/node_modules/react/umd/react.development.js $ROOT/public/static/js/ +cp $ROOT/node_modules/immutable/dist/immutable.min.js $ROOT/static/public/js/ +cp $ROOT/node_modules/react-dom/umd/react-dom.development.js $ROOT/static/public/js/ +cp $ROOT/node_modules/react/umd/react.development.js $ROOT/static/public/js/ diff --git a/src/client/web/build/template/index.template.dev.html b/src/client/web/build/template/index.template.dev.html index 66185c8..c05bf85 100644 --- a/src/client/web/build/template/index.template.dev.html +++ b/src/client/web/build/template/index.template.dev.html @@ -7,93 +7,93 @@ name="viewport" content="initial-scale=1.0, maximum-scale=1, minimum-scale=1, user-scalable=no,uc-fitscreen=yes" /> - - - + + + - - - - - - - - + + + + + + + + diff --git a/src/client/web/build/template/index.template.html b/src/client/web/build/template/index.template.html index e4b00c1..df3761a 100644 --- a/src/client/web/build/template/index.template.html +++ b/src/client/web/build/template/index.template.html @@ -7,93 +7,93 @@ name="viewport" content="initial-scale=1.0, maximum-scale=1, minimum-scale=1, user-scalable=no,uc-fitscreen=yes" /> - - - + + + - - - - - - - - + + + + + + + + + --> diff --git a/src/client/web/src/components/pane_admin.tsx b/src/client/web/src/components/pane_admin.tsx index 5d8ae65..f6498a2 100644 --- a/src/client/web/src/components/pane_admin.tsx +++ b/src/client/web/src/components/pane_admin.tsx @@ -846,7 +846,7 @@ export class SiteCfg extends React.Component { siteName: "Quickshare", siteDesc: "Quickshare", bg: { - url: "/static/img/textured_paper.png", + url: "", repeat: "repeat", position: "center", align: "fixed", diff --git a/src/client/web/webpack.app.dev.js b/src/client/web/webpack.app.dev.js index bbae7f1..1e58839 100644 --- a/src/client/web/webpack.app.dev.js +++ b/src/client/web/webpack.app.dev.js @@ -4,15 +4,6 @@ const HtmlWebpackPlugin = require("html-webpack-plugin"); const dev = require("./webpack.dev.js"); module.exports = merge(dev, { - entry: ["./src/app.tsx", "./src/components/api.ts"], - context: `${__dirname}`, - output: { - globalObject: "this", - path: `${__dirname}/../../../public/static`, - chunkFilename: "[name].bundle.js", - filename: "[name].bundle.js", - library: "Q", - }, plugins: [ new HtmlWebpackPlugin({ template: `${__dirname}/build/template/index.template.dev.html`, diff --git a/src/client/web/webpack.app.prod.js b/src/client/web/webpack.app.prod.js index e3f558f..d867e54 100644 --- a/src/client/web/webpack.app.prod.js +++ b/src/client/web/webpack.app.prod.js @@ -4,15 +4,6 @@ const HtmlWebpackPlugin = require("html-webpack-plugin"); const prod = require("./webpack.prod.js"); module.exports = merge(prod, { - entry: ["./src/app.tsx", "./src/components/api.ts"], - context: `${__dirname}`, - output: { - globalObject: "this", - path: `${__dirname}/../../../public/static`, - chunkFilename: "[name].bundle.js", - filename: "[name].bundle.js", - library: "Q", - }, plugins: [ new HtmlWebpackPlugin({ template: `${__dirname}/build/template/index.template.html`, diff --git a/src/client/web/webpack.common.js b/src/client/web/webpack.common.js index 26098cc..7186f75 100644 --- a/src/client/web/webpack.common.js +++ b/src/client/web/webpack.common.js @@ -8,6 +8,15 @@ const BundleAnalyzerPlugin = require("webpack-bundle-analyzer") module.exports = { + entry: ["./src/app.tsx", "./src/components/api.ts"], + context: `${__dirname}`, + output: { + globalObject: "this", + path: `${__dirname}/../../../static/public/js`, + chunkFilename: "[name].bundle.js", + filename: "[name].bundle.js", + library: "Q", + }, module: { rules: [ {