Skip to content

Commit

Permalink
Travis & Coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
vasa-c committed Dec 7, 2015
1 parent d137c4e commit bdcc9ac
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src_dir: .
coverage_clover: build/logs/clover.xml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ phpunit.xml
phpmd.xml
tests/tmp/*
!tests/tmp/.gitkeep
build/*
39 changes: 29 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
language: php

php:
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm

before_script:
matrix:
include:
- php: 5.4
env: CHECKS=yes
- php: 5.5
- php: 5.6
- php: 7.0
- php: hhvm

sudo: false

before_install:
- composer self-update
- composer install --no-interaction --dev

script: phpunit
install:
- composer install
- if [ "$CHECKS" = "yes" ]; then composer require satooshi/php-coveralls --dev; fi;
- if [ "$CHECKS" = "yes" ]; then composer require squizlabs/php_codesniffer="~2.3" --dev; fi;

script:
- if [ "$CHECKS" = "yes" ]; then mkdir -p build/logs; fi;
- if [ "$CHECKS" = "yes" ]; then phpunit --coverage-clover build/logs/clover.xml; else phpunit; fi;
- if [ "$CHECKS" = "yes" ]; then php vendor/bin/phpcs --standard=PSR2 --encoding=utf-8 --ignore=vendor .; fi;

after_success:
- if [ "$CHECKS" = "yes" ]; then php vendor/bin/coveralls -c .coveralls.yml; fi;

notifications:
email:
on_success: change
on_failure: always
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### dev-master

* Some style fixes
* Travis & Coveralls

### 0.1.0 (25.10.2015)
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# axy\min\html

Compress HTML.

[![Latest Stable Version](https://img.shields.io/packagist/v/axy/min-html.svg?style=flat-square)](https://packagist.org/packages/axy/min-html)
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%205.4-8892BF.svg?style=flat-square)](https://php.net/)
[![Build Status](https://img.shields.io/travis/axypro/min-html/master.svg?style=flat-square)](https://travis-ci.org/axypro/min-html)
[![Coverage Status](https://coveralls.io/repos/axypro/min-html/badge.svg?branch=master&service=github)](https://coveralls.io/github/axypro/min-html?branch=master)
[![License](https://poser.pugx.org/axy/min-html/license)](LICENSE)

Compress HTML.

* GitHub: [axypro/min-html](https://github.com/axypro/min-html)
* Composer: [axy/min-html](https://packagist.org/packages/axy/min-html)

PHP 5.4+

Library does not require any dependencies (except composer packages).
* The library does not require any dependencies.
* Tested on PHP 5.4+, PHP 7, HHVM (on Linux).
* Install: `composer require axy/min-html`.
* License: [MIT](LICENSE).

## Compression
### Compression

Simply removes the indentation at the beginning and end of lines.
With some exceptions:

* Indents inside some tags (as `<pre>` and `<textarea>`) are relevant.
* The content of some tags can be handled in a special way (compress for `<script>` and `<style>` for example).

## Example
#### Example

The source content:

Expand Down Expand Up @@ -68,7 +68,7 @@ of HTML compression.
</body>
```

## API
### API

The library defines the single public class `axy\min\html\HTMLMinifier`.

Expand All @@ -87,7 +87,7 @@ Static methods:
* `compressFile(string $source, string $destination [, array $tags]): string`
* `getDefaultsTags([array $tags]): array`

## Example
#### Example

Using static:

Expand Down

0 comments on commit bdcc9ac

Please sign in to comment.