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

github.com/treagod/minify-assets

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/treagod/minify-assets

  • v0.0.0-20240821113036-2c7742175972
  • Source
  • Go
  • Socket score

Version published
Created
Source

minify-assets-go

minify-assets-go is a simple Go script designed to minify CSS and JavaScript files in a given directory. It replaces the original asset files with their minified versions, helping to reduce file sizes and improve load times for web applications.

It's a simple wrapper around the minify tooling{:target="_blank"}.

Features

  • Minifies CSS and JavaScript: Automatically minifies all .css and .js files in the specified directory.
  • Recursive Directory Traversal: Processes all asset files within the specified root directory and its subdirectories.

Installation

To use this script, you need to have Go installed on your system. Clone the repository and initialize the Go module:

git clone https://github.com/treagod/minify-assets.git
cd minify-assets
go mod tidy

Usage

To run the script, provide the root directory containing your assets as an argument:

go run cmd/minify_assets/minify-assets-go.go /path/to/your/assets

This will traverse the specified directory, minify all .css and .js files, and overwrite the original files with their minified versions.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests to improve the tool.

FAQs

Package last updated on 21 Aug 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