Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gruntjs/grunt-contrib-htmlmin
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1648774c9a1e5a3a08702d4b38cc5519751cfed2
Choose a base ref
...
head repository: gruntjs/grunt-contrib-htmlmin
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b0dcacba63585b6960c8b32d95469bef73fc60c8
Choose a head ref

Commits on Nov 26, 2015

  1. Copy the full SHA
    d21f8f0 View commit details

Commits on Jan 5, 2016

  1. Update copyright to 2016

    shama committed Jan 5, 2016

    Unverified

    No user is associated with the committer email.
    Copy the full SHA
    afadcfc View commit details

Commits on Jan 30, 2016

  1. Copy the full SHA
    9ab2b0a View commit details
  2. Point main to task

    shama committed Jan 30, 2016
    Copy the full SHA
    6a85717 View commit details

Commits on Feb 20, 2016

  1. Bump dependencies.

    XhmikosR committed Feb 20, 2016
    Copy the full SHA
    d01a5b1 View commit details

Commits on Feb 29, 2016

  1. Update html-minifier dependency to resolve bug

    v1.2.0 resolved bug in html-minifier
    kangax/html-minifier#345 (comment)
    dxdc committed Feb 29, 2016

    Verified

    This commit was signed with the committer’s verified signature.
    coreyfarrell Corey Farrell
    Copy the full SHA
    d7fcdb5 View commit details

Commits on Mar 1, 2016

  1. Merge pull request #119 from dxdc/patch-1

    Update html-minifier dependency to resolve bug
    vladikoff committed Mar 1, 2016
    Copy the full SHA
    238af5c View commit details

Commits on Mar 4, 2016

  1. v1.0.0

    vladikoff committed Mar 4, 2016

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    cfc2aca View commit details

Commits on Mar 18, 2016

  1. Verified

    This commit was signed with the committer’s verified signature.
    coreyfarrell Corey Farrell
    Copy the full SHA
    2dba486 View commit details
  2. v1.1.0

    vladikoff committed Mar 18, 2016
    Copy the full SHA
    2f2ff6a View commit details
  3. Update CHANGELOG.

    [ci skip]
    XhmikosR committed Mar 18, 2016
    Copy the full SHA
    d8cd3a4 View commit details

Commits on Mar 31, 2016

  1. Verified

    This commit was signed with the committer’s verified signature.
    coreyfarrell Corey Farrell
    Copy the full SHA
    7c7df15 View commit details
  2. v1.2.0

    vladikoff committed Mar 31, 2016
    Copy the full SHA
    3c06aa2 View commit details
  3. update version

    vladikoff committed Mar 31, 2016

    Verified

    This commit was signed with the committer’s verified signature.
    coreyfarrell Corey Farrell
    Copy the full SHA
    03bb9b1 View commit details

Commits on Apr 6, 2016

  1. Verified

    This commit was signed with the committer’s verified signature.
    coreyfarrell Corey Farrell
    Copy the full SHA
    3f60aa8 View commit details

Commits on Apr 7, 2016

  1. Verified

    This commit was signed with the committer’s verified signature.
    coreyfarrell Corey Farrell
    Copy the full SHA
    32299aa View commit details

Commits on Apr 10, 2016

  1. 2

    Verified

    This commit was signed with the committer’s verified signature.
    coreyfarrell Corey Farrell
    Copy the full SHA
    c8c893b View commit details

Commits on Apr 19, 2016

  1. Verified

    This commit was signed with the committer’s verified signature.
    coreyfarrell Corey Farrell
    Copy the full SHA
    ff6529a View commit details
  2. v1.4.0.

    XhmikosR committed Apr 19, 2016
    1

    Verified

    This commit was signed with the committer’s verified signature.
    coreyfarrell Corey Farrell
    Copy the full SHA
    7d88913 View commit details

Commits on Jul 7, 2016

  1. Verified

    This commit was signed with the committer’s verified signature.
    coreyfarrell Corey Farrell
    Copy the full SHA
    d8eb575 View commit details

Commits on Jul 13, 2016

  1. Merge pull request #130 from lucastanz/master

    updated to version 2.1.7 for tags with commas like srcset
    XhmikosR authored Jul 13, 2016

    Verified

    This commit was signed with the committer’s verified signature.
    coreyfarrell Corey Farrell
    Copy the full SHA
    b32705f View commit details
  2. v1.5.0.

    XhmikosR committed Jul 13, 2016

    Verified

    This commit was signed with the committer’s verified signature.
    coreyfarrell Corey Farrell
    Copy the full SHA
    1ca3675 View commit details

Commits on Jul 14, 2016

  1. Fix typo in CHANGELOG.

    [ci skip]
    XhmikosR committed Jul 14, 2016
    Copy the full SHA
    43c64f9 View commit details

Commits on Jul 18, 2016

  1. Update dependencies.

    Note that html-minifier v3.0.0 supports node.js >= 4.
    XhmikosR committed Jul 18, 2016

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    69f06f4 View commit details
  2. Merge pull request #131 from gruntjs/deps

    Update html-minifier to v3.0.0.
    vladikoff authored Jul 18, 2016
    Copy the full SHA
    b8db17a View commit details
  3. v.2.0.0.

    XhmikosR committed Jul 18, 2016

    Verified

    This commit was signed with the committer’s verified signature.
    coreyfarrell Corey Farrell
    Copy the full SHA
    d41bf39 View commit details

Commits on Aug 30, 2016

  1. example for #134 in docs

    fassetar authored Aug 30, 2016

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    94d4897 View commit details
  2. forget cwd example

    fassetar authored Aug 30, 2016

    Verified

    This commit was signed with the committer’s verified signature.
    coreyfarrell Corey Farrell
    Copy the full SHA
    fc0c121 View commit details

Commits on Jan 5, 2017

  1. Merge pull request #136 from fassetar/patch-1

    example for #134 in docs
    vladikoff authored Jan 5, 2017
    Copy the full SHA
    a3ab8d5 View commit details

Commits on Jan 14, 2017

  1. Update docs.

    [ci skip]
    XhmikosR committed Jan 14, 2017
    Copy the full SHA
    556c63d View commit details
  2. Update CI configs.

    XhmikosR committed Jan 14, 2017
    Copy the full SHA
    165adf2 View commit details
  3. v2.1.0.

    XhmikosR committed Jan 14, 2017
    Copy the full SHA
    4ad1943 View commit details

Commits on Jan 30, 2017

  1. Copy the full SHA
    16e092d View commit details
  2. v2.2.0.

    XhmikosR committed Jan 30, 2017
    Copy the full SHA
    7e79402 View commit details

Commits on Mar 8, 2017

  1. Update html-minifier to v3.4.0.

    Release v2.3.0.
    XhmikosR committed Mar 8, 2017
    Copy the full SHA
    ce5d713 View commit details

Commits on May 16, 2017

  1. Copy the full SHA
    d1bd316 View commit details

Commits on Aug 19, 2017

  1. Update README.md

    XhmikosR authored Aug 19, 2017
    1
    Copy the full SHA
    88bbf7a View commit details

Commits on Aug 26, 2018

  1. v3.0.0.

    XhmikosR committed Aug 26, 2018
    1
    Copy the full SHA
    0865122 View commit details

Commits on Sep 4, 2018

  1. Merge pull request #144 from gruntjs/v3

    v3.0.0.
    vladikoff authored Sep 4, 2018
    Copy the full SHA
    b0dcacb View commit details
Showing with 5,095 additions and 53 deletions.
  1. +12 −3 .travis.yml
  2. +1 −1 AUTHORS
  3. +58 −7 CHANGELOG
  4. +1 −1 CONTRIBUTING.md
  5. +1 −1 LICENSE-MIT
  6. +54 −12 README.md
  7. +17 −12 appveyor.yml
  8. +32 −1 docs/htmlmin-examples.md
  9. +4,907 −0 package-lock.json
  10. +12 −15 package.json
15 changes: 12 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
sudo: false

language: node_js

node_js:
- '4'
- '0.12'
- '0.10'
- "6"
- "8"
- "10"

matrix:
fast_finish: true

cache:
directories:
- node_modules
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Sindre Sorhus (http://github.com/sindresorhus)
Sindre Sorhus (https://github.com/sindresorhus)
65 changes: 58 additions & 7 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,20 +1,71 @@
v3.0.0:
date: 2018-08-26
changes:
- Updated all dependencies.
- Requires Node.js >= 6.
v2.4.0:
date: 2017-05-16
changes:
- Updated html-minifier to v3.5.0.
v2.3.0:
date: 2017-03-08
changes:
- Updated html-minifier to v3.4.0.
v2.2.0:
date: 2017-01-30
changes:
- Updated html-minifier to v3.3.0.
v2.1.0:
date: 2017-01-14
changes:
- Updated html-minifier to v3.2.3 and pretty-bytes to 4.0.2.
v2.0.0:
date: 2016-07-19
changes:
- Updated html-minifier to v3.0.1. Note that Node.js < 4 isn't supported anymore.
v1.5.0:
date: 2016-07-13
changes:
- Updated html-minifier to v2.1.7.
v1.4.0:
date: 2016-04-19
changes:
- Updated html-minifier to v2.0.0.
v1.3.0:
date: 2016-04-10
changes:
- Updated html-minifier to v1.5.0.
v1.2.0:
date: 2016-03-31
changes:
- Updated html-minifier to v1.4.0.
v1.1.0:
date: 2016-03-18
changes:
- Updated html-minifier to v1.3.0.
v1.0.0:
date: 2016-03-04
changes:
- Updated html-minifier to v1.2.0.
- Point main to task.
- Drop peerDeps.
v0.6.0:
date: 2015-10-28
changes:
- Updated to `html-minifier` 1.0.0.
- Updated html-minifier to v1.0.0.
v0.5.0:
date: 2015-09-25
changes:
- Updated to `html-minifier` 0.8.0.
- Updated html-minifier to v0.8.0.
v0.4.0:
date: 2015-02-06
changes:
- Updated to `html-minifier` 0.7.0.
- Updated html-minifier to v0.7.0.
v0.3.0:
date: 2014-05-05
changes:
- Drop node.js 0.8 support.
- Updated to `html-minifier` 0.6.0.
- Drop Node.js 0.8 support.
- Updated html-minifier to v0.6.0.
v0.2.0:
date: 2014-02-09
changes:
@@ -26,7 +77,7 @@ v0.1.3:
v0.1.2:
date: 2013-04-05
changes:
- Update `html-minifier` which fixes IE conditional comments and prefixed HTML elements `<ng-include>` `<ng:include>`.
- Update html-minifier which fixes IE conditional comments and prefixed HTML elements `<ng-include>`, `<ng:include>`.
v0.1.1:
date: 2013-02-18
changes:
@@ -40,7 +91,7 @@ v0.1.1rc5:
date: 2013-01-09
changes:
- Updating to work with grunt v0.4.0rc5.
- Switching to this.filesSrc api.
- Switching to `this.filesSrc` API.
v0.1.0:
date: 2012-11-01
changes:
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Please see the [Contributing to grunt](http://gruntjs.com/contributing) guide for information on contributing to this project.
Please see the [Contributing to grunt](https://gruntjs.com/contributing) guide for information on contributing to this project.
2 changes: 1 addition & 1 deletion LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015 Sindre Sorhus, contributors
Copyright (c) 2016 Sindre Sorhus, contributors

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
66 changes: 54 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# grunt-contrib-htmlmin v0.6.0 [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-htmlmin.svg?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-htmlmin) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/sn73i2qggqeolnc2/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/grunt-contrib-htmlmin/branch/master)
# grunt-contrib-htmlmin v3.0.0 [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-htmlmin.svg?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-htmlmin) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/sn73i2qggqeolnc2/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/grunt-contrib-htmlmin/branch/master)

> Minify HTML


## Getting Started
This plugin requires Grunt `>=0.4.0`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
If you haven't used [Grunt](https://gruntjs.com/) before, be sure to check out the [Getting Started](https://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](https://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-contrib-htmlmin --save-dev
@@ -31,7 +30,9 @@ _Run this task with the `grunt htmlmin` command._

See the `html-minifier` [options](https://github.com/kangax/html-minifier#options-quick-reference).

#### Example
### Examples

#### Simple Example

```js
grunt.initConfig({
@@ -58,23 +59,64 @@ grunt.initConfig({
grunt.registerTask('default', ['htmlmin']);
```

#### Example with Nested Files

```js
grunt.initConfig({
htmlmin: { // Task
dist: { // Target
options: { // Target options
removeComments: true,
collapseWhitespace: true
},
files: { // Dictionary of files
'dist/index.html': 'src/index.html', // 'destination': 'source'
'dist/contact.html': 'src/contact.html'
}
},
dev: { // Another target
files: [{
expand: true,
cwd: 'app',
src: ['src/**/*.html', '*.html'],
dest: 'dist'
}]
}
}
});

grunt.registerTask('default', ['htmlmin']);
```


## Release History

* 2015-10-28   v0.6.0   Updated to `html-minifier` 1.0.0.
* 2015-09-25   v0.5.0   Updated to `html-minifier` 0.8.0.
* 2015-02-06   v0.4.0   Updated to `html-minifier` 0.7.0.
* 2014-05-05   v0.3.0   Drop node.js 0.8 support. Updated to `html-minifier` 0.6.0.
* 2018-08-26   v3.0.0   Updated all dependencies. Requires Node.js >= 6.
* 2017-05-16   v2.4.0   Updated html-minifier to v3.5.0.
* 2017-03-08   v2.3.0   Updated html-minifier to v3.4.0.
* 2017-01-30   v2.2.0   Updated html-minifier to v3.3.0.
* 2017-01-14   v2.1.0   Updated html-minifier to v3.2.3 and pretty-bytes to 4.0.2.
* 2016-07-19   v2.0.0   Updated html-minifier to v3.0.1. Note that Node.js < 4 isn't supported anymore.
* 2016-07-13   v1.5.0   Updated html-minifier to v2.1.7.
* 2016-04-19   v1.4.0   Updated html-minifier to v2.0.0.
* 2016-04-10   v1.3.0   Updated html-minifier to v1.5.0.
* 2016-03-31   v1.2.0   Updated html-minifier to v1.4.0.
* 2016-03-18   v1.1.0   Updated html-minifier to v1.3.0.
* 2016-03-04   v1.0.0   Updated html-minifier to v1.2.0. Point main to task. Drop peerDeps.
* 2015-10-28   v0.6.0   Updated html-minifier to v1.0.0.
* 2015-09-25   v0.5.0   Updated html-minifier to v0.8.0.
* 2015-02-06   v0.4.0   Updated html-minifier to v0.7.0.
* 2014-05-05   v0.3.0   Drop Node.js 0.8 support. Updated html-minifier to v0.6.0.
* 2014-02-09   v0.2.0   Rewrite task. Drop concat support.
* 2013-04-06   v0.1.3   Fail target when minify encounters an error.
* 2013-04-05   v0.1.2   Update `html-minifier` which fixes IE conditional comments and prefixed HTML elements `<ng-include>` `<ng:include>`.
* 2013-04-05   v0.1.2   Update html-minifier which fixes IE conditional comments and prefixed HTML elements `<ng-include>`, `<ng:include>`.
* 2013-02-18   v0.1.1   First official release for Grunt 0.4.0.
* 2013-01-30   v0.1.1rc7   Updating grunt/gruntplugin dependencies to rc7. Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions.
* 2013-01-09   v0.1.1rc5   Updating to work with grunt v0.4.0rc5. Switching to this.filesSrc api.
* 2013-01-09   v0.1.1rc5   Updating to work with grunt v0.4.0rc5. Switching to `this.filesSrc` API.
* 2012-11-01   v0.1.0   Initial release.

---

Task submitted by [Sindre Sorhus](http://github.com/sindresorhus)
Task submitted by [Sindre Sorhus](https://github.com/sindresorhus)

*This file was generated on Wed Oct 28 2015 01:32:22.*
*This file was generated on Sun Aug 26 2018 09:25:56.*
29 changes: 17 additions & 12 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
# AppVeyor file
# http://www.appveyor.com/docs/appveyor-yml
clone_depth: 10

version: "{build}"

clone_depth: 10

# What combinations to test
environment:
matrix:
- nodejs_version: "4"
- nodejs_version: "0.12"
- nodejs_version: "0.10"
- nodejs_version: "6"
platform: x86
- nodejs_version: "8"
platform: x86
- nodejs_version: "10"
platform: x86

install:
- ps: Install-Product node $env:nodejs_version
- ps: Install-Product node $env:nodejs_version $env:platform
- npm install

build: off

test_script:
# Output useful info for debugging
- node --version && npm --version
- npm test
# We test multiple Windows shells because of prior stdout buffering issues
# filed against Grunt. https://github.com/joyent/node/issues/3584
- ps: "npm test # PowerShell" # Pass comment to PS for easier debugging
- cmd: npm test

build: off

matrix:
fast_finish: true

cache:
- 'node_modules -> package.json' # local npm modules
- node_modules -> package.json
33 changes: 32 additions & 1 deletion docs/htmlmin-examples.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## Example
# Examples

## Simple Example

```js
grunt.initConfig({
@@ -24,3 +26,32 @@ grunt.initConfig({

grunt.registerTask('default', ['htmlmin']);
```

## Example with Nested Files

```js
grunt.initConfig({
htmlmin: { // Task
dist: { // Target
options: { // Target options
removeComments: true,
collapseWhitespace: true
},
files: { // Dictionary of files
'dist/index.html': 'src/index.html', // 'destination': 'source'
'dist/contact.html': 'src/contact.html'
}
},
dev: { // Another target
files: [{
expand: true,
cwd: 'app',
src: ['src/**/*.html', '*.html'],
dest: 'dist'
}]
}
}
});

grunt.registerTask('default', ['htmlmin']);
```
4,907 changes: 4,907 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

27 changes: 12 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,31 @@
{
"name": "grunt-contrib-htmlmin",
"description": "Minify HTML",
"version": "0.6.0",
"version": "3.0.0",
"author": {
"name": "Grunt Team",
"url": "http://gruntjs.com/"
"url": "https://gruntjs.com/"
},
"repository": "gruntjs/grunt-contrib-htmlmin",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
"node": ">=6"
},
"main": "tasks/htmlmin.js",
"scripts": {
"test": "grunt test"
},
"dependencies": {
"chalk": "^1.0.0",
"html-minifier": "^1.0.0",
"pretty-bytes": "^2.0.1"
"chalk": "^2.4.1",
"html-minifier": "~3.5.20",
"pretty-bytes": "^5.1.0"
},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-internal": "^0.4.12",
"grunt-contrib-jshint": "^0.11.0",
"grunt-contrib-nodeunit": "^0.4.1"
},
"peerDependencies": {
"grunt": ">=0.4.0"
"grunt": "^1.0.3",
"grunt-contrib-clean": "^1.1.0",
"grunt-contrib-internal": "^3.1.0",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-nodeunit": "^2.0.0"
},
"keywords": [
"gruntplugin",