Giter VIP home page Giter VIP logo

hx-minifier's Introduction

Haxe HTML/CSS Minifier

Build Status Haxelib Version

This project does not aim to be the smallest but to provide just a way to minify HTML / CSS files.

Installation

Install using Haxelib:

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] <path>    : File to process. required. Should have extension
[-out] <path>   : 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

hx-minifier's People

Contributors

markknol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

sondro

hx-minifier's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.