Alitindrawan24 / go-minifier

Go Minifier

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go Minifier

Go Minifier is is a lightweight command-line tool designed to simplify and streamline the minification process for CSS and JS (upcoming) files,. Minification involves the removal of unnecessary characters and spaces from code, resulting in smaller file sizes that contribute to improved web page loading times.

1. Requirement

  • Go

2. Installation & Setup

  • Install Go Minifier to using directly from command line
go install github.com/Alitindrawan24/go-minifier
  • For local development, clone project from the repository using http
git clone https://github.com/Alitindrawan24/go-minifier.git
  • Clone project from the repository if using ssh
git clone git@github.com:Alitindrawan24/go-minifier.git

3. Usage

  • To minify a css file, run the following command and the minify file will be generated on the same directory with same name as the css file but using min.css extension
go run . -src=filename.css
  • To customize the output filename and extension, run the following command
go run . -src=filename.css -out=out.min.css

4. Todo

  • Minify js file
  • Minify all css/js in a directory

About

Go Minifier

License:MIT License


Languages

Language:Go 100.0%