mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
feat: use CDN for nebula frontend assets
This commit is contained in:
parent
3637f27369
commit
a3edb65613
10
Makefile
10
Makefile
@ -313,17 +313,19 @@ gen-pkl:
|
|||||||
|
|
||||||
.PHONY: build-motr build-hway build-nebula
|
.PHONY: build-motr build-hway build-nebula
|
||||||
|
|
||||||
build-hway: gen-templ gen-pkl
|
hway-build: gen-templ
|
||||||
@echo "(motr) Building Highway gateway"
|
@echo "(motr) Building Highway gateway"
|
||||||
go run github.com/syumai/workers/cmd/workers-assets-gen@v0.23.1 -o ./cmd/hway/build -mode go
|
|
||||||
GOOS=js GOARCH=wasm go build -o ./cmd/hway/build/app.wasm ./cmd/hway/server.go
|
GOOS=js GOARCH=wasm go build -o ./cmd/hway/build/app.wasm ./cmd/hway/server.go
|
||||||
|
|
||||||
|
hway-dev:
|
||||||
|
@echo "(motr) Deploying Highway gateway"
|
||||||
|
cd cmd/hway && bun run dev
|
||||||
|
|
||||||
build-motr: gen-templ gen-pkl
|
motr-build: gen-templ gen-pkl
|
||||||
@echo "(dwn) Building motr.wasm -> Service Worker IPFS Vault"
|
@echo "(dwn) Building motr.wasm -> Service Worker IPFS Vault"
|
||||||
GOOS=js GOARCH=wasm go build -o ./pkg/dwn/app.wasm ./cmd/motr/main.go
|
GOOS=js GOARCH=wasm go build -o ./pkg/dwn/app.wasm ./cmd/motr/main.go
|
||||||
|
|
||||||
build-nebula:
|
nebula-build:
|
||||||
@echo "(nebula) Building nebula"
|
@echo "(nebula) Building nebula"
|
||||||
cd pkg/nebula && bun install && bun run build
|
cd pkg/nebula && bun install && bun run build
|
||||||
|
|
||||||
|
@ -13,24 +13,24 @@ var (
|
|||||||
|
|
||||||
templ Styles() {
|
templ Styles() {
|
||||||
@stylesHandle.Once() {
|
@stylesHandle.Once() {
|
||||||
<link href={ "/assets/css/styles.css" } rel="stylesheet"/>
|
<link href={ "https://cdn.sonr.id/css/styles.css" } rel="stylesheet"/>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
templ Alpine() {
|
templ Alpine() {
|
||||||
@alpineHandle.Once() {
|
@alpineHandle.Once() {
|
||||||
<script src={ "/js/alpine.min.js" } defer></script>
|
<script src={ "https://cdn.sonr.id/js/alpine.min.js" } defer></script>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
templ Dexie() {
|
templ Dexie() {
|
||||||
@dexieHandle.Once() {
|
@dexieHandle.Once() {
|
||||||
<script src={ "/js/dexie.min.js" }></script>
|
<script src={ "https://cdn.sonr.id/js/dexie.min.js" }></script>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
templ Htmx() {
|
templ Htmx() {
|
||||||
@htmxHandle.Once() {
|
@htmxHandle.Once() {
|
||||||
<script src={ "/js/htmx.min.js" }></script>
|
<script src={ "https://cdn.sonr.id/js/htmx.min.js" }></script>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,9 +57,9 @@ func Styles() templ.Component {
|
|||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
var templ_7745c5c3_Var3 string
|
var templ_7745c5c3_Var3 string
|
||||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs("/assets/css/styles.css")
|
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/css/styles.css")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/assets/scripts.templ`, Line: 16, Col: 39}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/assets/scripts.templ`, Line: 16, Col: 51}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -117,9 +117,9 @@ func Alpine() templ.Component {
|
|||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
var templ_7745c5c3_Var6 string
|
var templ_7745c5c3_Var6 string
|
||||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs("/js/alpine.min.js")
|
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/alpine.min.js")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/assets/scripts.templ`, Line: 22, Col: 35}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/assets/scripts.templ`, Line: 22, Col: 54}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -177,9 +177,9 @@ func Dexie() templ.Component {
|
|||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
var templ_7745c5c3_Var9 string
|
var templ_7745c5c3_Var9 string
|
||||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs("/js/dexie.min.js")
|
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/dexie.min.js")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/assets/scripts.templ`, Line: 28, Col: 34}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/assets/scripts.templ`, Line: 28, Col: 53}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -237,9 +237,9 @@ func Htmx() templ.Component {
|
|||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
var templ_7745c5c3_Var12 string
|
var templ_7745c5c3_Var12 string
|
||||||
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs("/js/htmx.min.js")
|
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/htmx.min.js")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/assets/scripts.templ`, Line: 34, Col: 33}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/assets/scripts.templ`, Line: 34, Col: 52}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user