Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/ugent-library/mix

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/ugent-library/mix

  • v0.0.0-20230123152737-b51ce0c6439b
  • Source
  • Go
  • Socket score

Version published
Created
Source

Go Reference

ugent-library/mix

Package mix implements convenience methods to integrate the Laravel Mix asset bundler in your Go project.

For more information on Laravel Mix, visit the Laravel Mix website.

Install

go get -u github.com/ugent-library/mix

Example

Setup your webpack.mix.js:

const mix = require('laravel-mix')
mix.sass('./assets/css/app.scss', 'css')
mix.setPublicPath('./static')
// ...

And in your Go app:

    // setup file server
    mux := http.NewServeMux()
    mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("./static"))))

    // setup assets
    assets, err := mix.New(mix.Config{
        ManifestFile: "static/mix-manifest.json",
        PublicPath:   "/static/",
    })
    if err != nil {
        log.Fatal(err)
    }

    // make asset path helper available to templates
    funcs := template.FuncMap{
        "assetPath": assets.AssetPath,
    }

    // ...

FAQs

Package last updated on 23 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc