Minify and compress statics
This commit is contained in:
parent
ec4eec6bfb
commit
8f3fe41798
6 changed files with 786 additions and 127 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -205,6 +205,7 @@ Temporary Items
|
|||
# User specific
|
||||
.idea/
|
||||
static/css/style.css
|
||||
static/js/app.min.js
|
||||
storage/
|
||||
docs/
|
||||
templates/openapi/
|
||||
|
|
10
Dockerfile
10
Dockerfile
|
@ -28,9 +28,15 @@ COPY --from=logo /logo/logo.txt .
|
|||
COPY entrypoint.sh .
|
||||
RUN chmod +x entrypoint.sh
|
||||
|
||||
# default bookmarks.json
|
||||
COPY --from=go /backend/bookmarks/bookmarks.json ./bookmarks/bookmarks.json
|
||||
COPY --from=go /backend/templates ./templates/
|
||||
COPY --from=go /backend/static ./static/
|
||||
# go templates
|
||||
COPY --from=go /backend/templates/ ./templates/
|
||||
# build static files and favicons
|
||||
COPY --from=go /backend/static/favicon/ ./static/favicon/
|
||||
COPY --from=go /backend/static/css/style.css ./static/css/style.css
|
||||
COPY --from=go /backend/static/js/app.min.js ./static/js/app.min.js
|
||||
# go executable
|
||||
COPY --from=go /backend/app .
|
||||
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
|
|
884
package-lock.json
generated
884
package-lock.json
generated
File diff suppressed because it is too large
Load diff
14
package.json
14
package.json
|
@ -1,14 +1,22 @@
|
|||
{
|
||||
"watch": {
|
||||
"buildJavascript": "./static/js/app.js"
|
||||
},
|
||||
"scripts": {
|
||||
"watch": "npm-watch",
|
||||
"devTailwind": "npx tailwindcss -i ./static/css/input.css -o ./static/css/style.css --watch",
|
||||
"devGo": "nodemon --exec go run main.go --signal SIGTERM",
|
||||
"build": "npx tailwindcss -i ./static/css/input.css -o ./static/css/style.css --minify"
|
||||
"buildTailwind": "npx tailwindcss -i ./static/css/input.css -o ./static/css/style.css --minify",
|
||||
"buildJavascript": "terser ./static/js/app.js -o ./static/js/app.min.js -c -m",
|
||||
"dev": "bash -c \"npm run devTailwind &npm run watch\"",
|
||||
"build": "npm run buildTailwind && npm run buildJavascript"
|
||||
},
|
||||
"devDependencies": {
|
||||
"daisyui": "^2.33.0",
|
||||
"npm-watch": "^0.11.0",
|
||||
"prettier": "^2.7.1",
|
||||
"prettier-plugin-go-template": "^0.0.13",
|
||||
"tailwindcss": "^3.2.0"
|
||||
"tailwindcss": "^3.2.0",
|
||||
"terser": "^5.16.1"
|
||||
},
|
||||
"prettier": {
|
||||
"printWidth": 160,
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="/static/css/style.css" />
|
||||
<script type="module" src="/static/js/app.js"></script>
|
||||
<script type="module" src="/static/js/app.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if .System.Static.CPU.Name }}
|
||||
{{ if .System.Static.Host.Architecture }}
|
||||
{{ template "systemIcons" . }}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue