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

github.com/Defacto2/server

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/Defacto2/server

  • v1.5.3
  • Source
  • Go
  • Socket score

Version published
Created
Source

This assets/ directory should contain original JS and CSS source files that are used in the project. These files will be minified and copied to the public/ directory whenever the project is built.

When adding new JS or CSS the following steps will need to be followed.

  1. Add the new file to the assets/js or assets/css directory.
  2. Add the named file to /runner/runner.go so the asset will be minified and copied to the public/ directory.
  3. Create two new consts for the new file paths in handler/app/app.go.
  4. Create a new key in the SRI type struct in handler/app/app.go.
  5. Create a new Verify function result in handler/app/app.go.
  6. Create a new route in handler/router.go.
  7. Create a new TemplateFuncMap entry in handler/app/funcmap.go.
  8. In the view/app/layout.tmpl file, add a new

An example for a new.js file:

  1. assets/js/new.js
  2. newJS := api.Build(api.BuildOptions{...})
  3. NewJS = "/js/new.min.js" NewPub = public + NewJS
  4. type SRI struct { ... NewSRI string }
  5. s.NewJS, err = helper.Integrity(NewPub, fs)
  6. e.FileFS(app.NewJS, app.NewPub, public)
  7. "sriNew": func() string { return web.Subresource.NewJS }, "newjs": func() string { return NewJS },

FAQs

Package last updated on 24 Nov 2024

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