chore(ci/cd): refine scripts and docs (#36)
* chore(ci/cd): refine scripts and docs * text(server): fix incorrect server port
This commit is contained in:
parent
e87a342c93
commit
ede6c239f0
23 changed files with 81 additions and 296 deletions
|
@ -86,7 +86,7 @@
|
|||
name="msapplication-TileImage"
|
||||
content="/static/fav/ms-icon-144x144.png"
|
||||
/> -->
|
||||
<!-- <meta name="theme-color" content="#ffffff" />
|
||||
<meta name="theme-color" content="#ffffff" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="content"><div id="mount"></div></div>
|
||||
|
|
|
@ -4,20 +4,19 @@
|
|||
"description": "web client for quickshare",
|
||||
"main": "",
|
||||
"scripts": {
|
||||
"build": "webpack --config webpack.app.prod.js",
|
||||
"build": "yarn prod:addjs && webpack --config webpack.app.prod.js",
|
||||
"build:watch": "webpack --config webpack.app.prod.js --watch",
|
||||
"build:dev": "webpack --config webpack.app.dev.js --watch",
|
||||
"build:admin": "webpack --config webpack.admin.prod.js",
|
||||
"build:admin:watch": "webpack --config webpack.admin.prod.js --watch",
|
||||
"build:admin:dev": "webpack --config webpack.admin.dev.js --watch",
|
||||
"build:task": "webpack --config webpack.task.prod.js",
|
||||
"build:task:watch": "webpack --config webpack.task.prod.js --watch",
|
||||
"build:task:dev": "webpack --config webpack.task.dev.js --watch",
|
||||
"e2e": "jest -c jest.e2e.config.js",
|
||||
"e2e:watch": "jest --watch -c jest.e2e.config.js",
|
||||
"build:dev": "yarn dev:addjs && webpack --config webpack.app.dev.js --watch",
|
||||
"test": "jest test --maxWorkers=2",
|
||||
"test:watch": "jest test --watch --maxWorkers=2",
|
||||
"copy": "cp -r ../../static ../../../dockers/nginx/"
|
||||
"dev:addjs": "yarn && yarn dev:copy-immutable && yarn dev:copy-react-dom && yarn dev:copy-react",
|
||||
"dev:copy-immutable": "cp ../../../node_modules/immutable/dist/immutable.min.js ../../../public/static/js/",
|
||||
"dev:copy-react-dom": "cp ../../../node_modules/react-dom/umd/react-dom.development.js ../../../public/static/js/",
|
||||
"dev:copy-react": "cp ../../../node_modules/react/umd/react.development.js ../../../public/static/js/",
|
||||
"prod:addjs": "yarn && yarn prod:copy-immutable && yarn prod:copy-react-dom && yarn prod:copy-react",
|
||||
"prod:copy-immutable": "cp ../../../node_modules/immutable/dist/immutable.min.js ../../../public/static/js/",
|
||||
"prod:copy-react-dom": "cp ../../../node_modules/react-dom/umd/react-dom.production.min.js ../../../public/static/js/",
|
||||
"prod:copy-react": "cp ../../../node_modules/react/umd/react.production.min.js ../../../public/static/js/"
|
||||
},
|
||||
"author": "hexxa",
|
||||
"license": "LGPL-3.0",
|
||||
|
|
|
@ -83,9 +83,9 @@ export class Browser extends React.Component<Props, State, {}> {
|
|||
};
|
||||
|
||||
addUploads = (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||
const fileList = List<File>();
|
||||
let fileList = List<File>();
|
||||
for (let i = 0; i < event.target.files.length; i++) {
|
||||
fileList.push(event.target.files[i]);
|
||||
fileList = fileList.push(event.target.files[i]);
|
||||
}
|
||||
updater().addUploads(fileList);
|
||||
this.update(updater().setBrowser);
|
||||
|
|
|
@ -5,10 +5,6 @@ const dev = require("./webpack.dev.js");
|
|||
|
||||
module.exports = merge(dev, {
|
||||
entry: "./src/app.tsx",
|
||||
// entry: [
|
||||
// "./src/app.tsx",
|
||||
// "./src/worker/uploader.worker.ts",
|
||||
// ],
|
||||
context: `${__dirname}`,
|
||||
output: {
|
||||
globalObject: "this",
|
||||
|
|
|
@ -7,6 +7,7 @@ module.exports = merge(prod, {
|
|||
entry: "./src/app.tsx",
|
||||
context: `${__dirname}`,
|
||||
output: {
|
||||
globalObject: "this",
|
||||
path: `${__dirname}/../../../public/static`,
|
||||
chunkFilename: "[name].bundle.js",
|
||||
filename: "[name].bundle.js"
|
||||
|
@ -15,7 +16,8 @@ module.exports = merge(prod, {
|
|||
new HtmlWebpackPlugin({
|
||||
template: `${__dirname}/build/template/index.template.html`,
|
||||
hash: true,
|
||||
filename: `../index.html`
|
||||
filename: `../index.html`,
|
||||
minify: false
|
||||
})
|
||||
]
|
||||
});
|
||||
|
|
|
@ -65,12 +65,7 @@ module.exports = {
|
|||
chunks: "all",
|
||||
minChunks: 2,
|
||||
reuseExistingChunk: true,
|
||||
},
|
||||
// worker: {
|
||||
// name: "worker",
|
||||
// test: /[\\/]worker[\\/]/,
|
||||
// filename: "[name].bundle.js"
|
||||
// }
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -62,7 +62,7 @@ func DefaultConfig() (string, error) {
|
|||
Server: &ServerCfg{
|
||||
Debug: false,
|
||||
Host: "0.0.0.0",
|
||||
Port: 8888,
|
||||
Port: 8686,
|
||||
ReadTimeout: 2000,
|
||||
WriteTimeout: 1000 * 3600 * 24, // 1 day
|
||||
MaxHeaderBytes: 512,
|
||||
|
|
|
@ -18,7 +18,7 @@ import (
|
|||
)
|
||||
|
||||
func TestFileHandlers(t *testing.T) {
|
||||
addr := "http://127.0.0.1:8888"
|
||||
addr := "http://127.0.0.1:8686"
|
||||
root := "testData"
|
||||
config := `{
|
||||
"users": {
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
)
|
||||
|
||||
func TestSingleUserHandlers(t *testing.T) {
|
||||
addr := "http://127.0.0.1:8888"
|
||||
addr := "http://127.0.0.1:8686"
|
||||
root := "testData"
|
||||
config := `{
|
||||
"users": {
|
||||
|
|
|
@ -32,7 +32,7 @@ func startTestServer(config string) *Server {
|
|||
}
|
||||
|
||||
func waitForReady(addr string) bool {
|
||||
retry := 10
|
||||
retry := 20
|
||||
setCl := client.NewSettingsClient(addr)
|
||||
|
||||
for retry > 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue