New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/fragmenta/assets

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/fragmenta/assets

  • v1.4.0
  • Source
  • Go
  • Socket score

Version published
Created
Source

Assets

Assets provides asset compilation, concatenation and fingerprinting. Asset details are stored in a file at secrets/assets.json by default.

Usage

Use the assets package to organize assets however you like within your src folder, and output them in compressed form in your public/assets folder when you come to deploy your app.

  // Load asset details from json file on each run
  err := appAssets.Load()
  if err != nil {
    // If no assets loaded, compile for the first time (produces files in public/assets)
    err := appAssets.Compile("src", "public")
    if err != nil {
      server.Fatalf("#error compiling assets %s", err)
    }
  }

// Use the asset helpers to generate fingerprinted assets (either one fingerprinted file in production or a list of all files in development) - this is similar to the Rails asset pipeline.

  view.Helpers["style"] = appAssets.StyleLink
  view.Helpers["script"] = appAssets.ScriptLink

FAQs

Package last updated on 06 Jan 2017

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