include dist
This commit is contained in:
parent
723438a677
commit
4130d7fab5
9 changed files with 3584 additions and 7 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -7,3 +7,4 @@ js/node_modules
|
||||||
go.work
|
go.work
|
||||||
go.work.sum
|
go.work.sum
|
||||||
.idea
|
.idea
|
||||||
|
!framework/assets/dist
|
||||||
1
framework/assets/dist/chunk-6SVMKLCC.js
vendored
Normal file
1
framework/assets/dist/chunk-6SVMKLCC.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3530
framework/assets/dist/chunk-KYYNSHM3.js
vendored
Normal file
3530
framework/assets/dist/chunk-KYYNSHM3.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
framework/assets/dist/main.css
vendored
Normal file
1
framework/assets/dist/main.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
framework/assets/dist/mhtml.js
vendored
Normal file
1
framework/assets/dist/mhtml.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +0,0 @@
|
||||||
import htmx from "htmx.org";
|
|
||||||
|
|
||||||
htmx.findAll("body");
|
|
||||||
|
|
||||||
alert("here");
|
|
||||||
48
framework/tooling/bundle/bundle.go
Normal file
48
framework/tooling/bundle/bundle.go
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"golang.org/x/mod/modfile"
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
|
func getModuleVersion(modulePath string) (string, error) {
|
||||||
|
// Read the go.mod file
|
||||||
|
data, err := os.ReadFile("go.mod")
|
||||||
|
if err != nil {
|
||||||
|
return "", fmt.Errorf("error reading go.mod: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parse the go.mod file
|
||||||
|
modFile, err := modfile.Parse("go.mod", data, nil)
|
||||||
|
if err != nil {
|
||||||
|
return "", fmt.Errorf("error parsing go.mod: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find the module version
|
||||||
|
for _, req := range modFile.Require {
|
||||||
|
if req.Mod.Path == modulePath {
|
||||||
|
return req.Mod.Version, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return "", fmt.Errorf("module %s not found in go.mod", modulePath)
|
||||||
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
modulePath := "github.com/maddalax/mhtml/framework"
|
||||||
|
version, err := getModuleVersion(modulePath)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Error: %v", err)
|
||||||
|
}
|
||||||
|
dirname, err := os.UserHomeDir()
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
assetDir := fmt.Sprintf("%s/go/pkg/mod/%s@%s/assets", dirname, modulePath, version)
|
||||||
|
files, _ := os.ReadDir(assetDir)
|
||||||
|
for _, file := range files {
|
||||||
|
fmt.Println(file.Name())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,7 +5,7 @@ go 1.23.0
|
||||||
require (
|
require (
|
||||||
github.com/gofiber/fiber/v2 v2.52.5
|
github.com/gofiber/fiber/v2 v2.52.5
|
||||||
github.com/google/uuid v1.6.0
|
github.com/google/uuid v1.6.0
|
||||||
github.com/maddalax/mhtml/framework v0.0.0-20240913172653-23dd1db77843
|
github.com/maddalax/mhtml/framework v0.0.0-20240913182902-723438a677ae
|
||||||
github.com/maddalax/mhtml/framework-ui v0.0.0-20240913172832-ad335247426d
|
github.com/maddalax/mhtml/framework-ui v0.0.0-20240913172832-ad335247426d
|
||||||
github.com/redis/go-redis/v9 v9.6.1
|
github.com/redis/go-redis/v9 v9.6.1
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue