Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/markknol/hx-minifier
Haxe HTML/CSS Minifier
https://github.com/markknol/hx-minifier
css-minifier haxe haxelib html-minifier minification tool
Last synced: 14 days ago
JSON representation
Haxe HTML/CSS Minifier
- Host: GitHub
- URL: https://github.com/markknol/hx-minifier
- Owner: markknol
- Created: 2018-03-27T08:51:34.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-16T07:45:08.000Z (over 5 years ago)
- Last Synced: 2024-11-25T06:52:08.939Z (2 months ago)
- Topics: css-minifier, haxe, haxelib, html-minifier, minification, tool
- Language: HTML
- Size: 64.5 KB
- Stars: 5
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Haxe HTML/CSS Minifier
[![Build Status](https://travis-ci.org/markknol/hx-minifier.svg?branch=master)](https://travis-ci.org/markknol/hx-minifier)
[![Haxelib Version](https://img.shields.io/github/tag/markknol/hx-minifier.svg?label=haxelib)](http://lib.haxe.org/p/Minifier)This project does not aim to be the smallest but to provide just a way to minify HTML / CSS files.
## Installation
Install using [Haxelib](https://lib.haxe.org/p/Minifier/):
```
haxelib install minifier
```To use in code, add to your build hxml:
```
-lib minifier
```## API
* `public static function minifyHtml(content:String, keepComments:Bool = true)`
Minifies HTML. Assumes only `textarea`, `pre`, `script`, `code` tags contain meaningful spaces/newlines.
* `public static function minifyCss(content:String, keepComments:Bool = true)`]
Minify a (valid) CSS document.
* `public static function removeHtmlComments(content:String)`
Remove HTML comments from given `content`.
* `public static function removeCssComments(content:String)`
Remove CSS comments from given `content`.### Command-line
The library also comes as command-line tool. At the moment this is only per file, with specific extension.
```
HTML/CSS Minifier
https://github.com/markknol/hxminifier[-in] : File to process. required. Should have extension
[-out] : Project out folder. By default same as in-path
[--overwrite] : Allows overwriting in output. By default no file
[--no-comments] : Removes comments. By default comments are kept
```### Dependencies
* [Haxe](https://haxe.org/)