mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-24 10:07:21 +02:00
Integrated styles task
This commit is contained in:
parent
7e21566af3
commit
c2346e3275
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,6 +14,7 @@ drone.sublime-workspace
|
||||
*.rice-box.go
|
||||
*.db
|
||||
*.txt
|
||||
*.min.css
|
||||
*.min.js
|
||||
*_bindata.go
|
||||
*.toml
|
||||
|
39
make.go
39
make.go
@ -9,6 +9,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
@ -67,10 +68,42 @@ func scripts() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// styles step concatinates the css files.
|
||||
// styles step concatinates the stylesheet files.
|
||||
func styles() error {
|
||||
// concatinate styles
|
||||
// inject css variables?
|
||||
files := []string{
|
||||
"cmd/drone-server/static/styles/reset.css",
|
||||
"cmd/drone-server/static/styles/fonts.css",
|
||||
"cmd/drone-server/static/styles/alert.css",
|
||||
"cmd/drone-server/static/styles/blankslate.css",
|
||||
"cmd/drone-server/static/styles/list.css",
|
||||
"cmd/drone-server/static/styles/label.css",
|
||||
"cmd/drone-server/static/styles/range.css",
|
||||
"cmd/drone-server/static/styles/switch.css",
|
||||
"cmd/drone-server/static/styles/main.css",
|
||||
}
|
||||
|
||||
f, err := os.OpenFile(
|
||||
"cmd/drone-server/static/styles/drone.min.css",
|
||||
os.O_CREATE|os.O_RDWR|os.O_TRUNC,
|
||||
0660)
|
||||
|
||||
defer f.Close()
|
||||
|
||||
if err != nil {
|
||||
fmt.Println("Failed to open output file")
|
||||
return err
|
||||
}
|
||||
|
||||
for _, input := range files {
|
||||
content, err := ioutil.ReadFile(input)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
f.Write(content)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user