1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-11-24 08:22:29 +02:00

Move package.json and webpack to under webapp

This commit is contained in:
Chen-I Lim 2020-10-20 11:48:22 -07:00
parent 70f9eff13b
commit 49a7ed2b5d
6 changed files with 25 additions and 35 deletions

2
.vscode/launch.json vendored
View File

@ -22,4 +22,4 @@
"type": "pwa-node"
}
]
}
}

View File

@ -1,44 +1,30 @@
.PHONY: prebuild clean cleanall pack packdev builddev build watch go goUbuntu
.PHONY: prebuild clean cleanall server server-linux generate watch-server
all: build
all: server
pack:
npm run pack
prebuild:
go get github.com/gorilla/mux
go get github.com/gorilla/websocket
go get github.com/spf13/viper
go get github.com/lib/pq
go get github.com/mattn/go-sqlite3
packdev:
npm run packdev
go:
server:
cd server; go build -o ../bin/octoserver ./main
server-linux:
cd server; env GOOS=linux GOARCH=amd64 go build -o ../bin/octoserver ./main
generate:
cd server; go generate ./...
watch-server:
cd server; modd
goUbuntu:
cd server; env GOOS=linux GOARCH=amd64 go build -o ../bin/octoserver ./main
builddev: packdev go
build: pack go
watch:
npm run watchdev
prebuild:
npm install
go get github.com/gorilla/mux
go get github.com/gorilla/websocket
go get github.com/spf13/viper
go get github.com/lib/pq
go get github.com/mattn/go-sqlite3
clean:
rm -rf bin
rm -rf dist
rm -rf pack
rm -rf webapp/pack
cleanall: clean
rm -rf node_modules
rm -rf webapp/node_modules

View File

@ -3,6 +3,10 @@
## Build instructions
```
cd webapp
npm install
npm run packdev
cd ..
make prebuild
make
```

View File

@ -5,7 +5,7 @@
"dbconfig": "./octo.db",
"postgres_dbconfig": "dbname=octo sslmode=disable",
"useSSL": false,
"webpath": "./pack",
"webpath": "./webapp/pack",
"filespath": "./files",
"telemetry": true
}

View File

@ -18,12 +18,12 @@
"paths": {
"*": [
"node_modules/*",
"webapp/@custom_types/*"
"@custom_types/*"
]
}
},
"include": [
"./webapp"
"."
],
"exclude": [
]

View File

@ -9,7 +9,7 @@ function makeCommonConfig() {
const commonConfig = {
target: "web",
mode: "development",
entry: "./webapp/index.js",
entry: "./index.js",
node: {
__dirname: false,
__filename: false
@ -51,7 +51,7 @@ function makeCommonConfig() {
plugins: [
new CopyPlugin({
patterns: [
{ from: path.resolve(__dirname, "webapp/static"), to: "static" },
{ from: path.resolve(__dirname, "static"), to: "static" },
{ from: path.resolve(__dirname, "node_modules/easymde/dist/easymde.min.css"), to: "static" },
],
}),
@ -65,7 +65,7 @@ function makeCommonConfig() {
}),
],
entry: {
main: "./webapp/src/main.tsx",
main: "./src/main.tsx",
},
output: {
filename: "static/[name].js",