grunt-indent
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "grunt-indent", | ||
"description": "Change the indentation of files.", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"homepage": "https://github.com/stevenbenner/grunt-indent", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -84,4 +84,5 @@ # grunt-indent [![Build Status](https://travis-ci.org/stevenbenner/grunt-indent.png)](https://travis-ci.org/stevenbenner/grunt-indent) | ||
## Release History | ||
* 2013-03-23 v0.1.3 Files will now be saved with Grunt defined line endings. | ||
* 2013-03-21 v0.1.2 Fixed bug with empty lines when file uses Windows style line endings. | ||
* 2013-03-17 v0.1.1 Added support for single-file destinations. | ||
* 2013-03-16 v0.1.0 Initial release. |
@@ -66,3 +66,3 @@ /* | ||
grunt.file.write(dest, newFile.join('\n')); | ||
grunt.file.write(dest, newFile.join(grunt.util.linefeed)); | ||
}); | ||
@@ -69,0 +69,0 @@ }); |
@@ -5,9 +5,13 @@ 'use strict'; | ||
function getNormalizedFile(filePath) { | ||
return grunt.util.normalizelf(grunt.file.read(filePath)); | ||
} | ||
exports.indent = { | ||
increase: function(test) { | ||
var actualJs = grunt.file.read('tmp/increase/test.js'), | ||
actualCss = grunt.file.read('tmp/increase/test.css'), | ||
expectedJs = grunt.file.read('test/expected/increase/test.js'), | ||
expectedCss = grunt.file.read('test/expected/increase/test.css'); | ||
var actualJs = getNormalizedFile('tmp/increase/test.js'), | ||
actualCss = getNormalizedFile('tmp/increase/test.css'), | ||
expectedJs = getNormalizedFile('test/expected/increase/test.js'), | ||
expectedCss = getNormalizedFile('test/expected/increase/test.css'); | ||
@@ -23,6 +27,6 @@ test.expect(2); | ||
decrease: function(test) { | ||
var actualJs = grunt.file.read('tmp/decrease/test.js'), | ||
actualCss = grunt.file.read('tmp/decrease/test.css'), | ||
expectedJs = grunt.file.read('test/expected/decrease/test.js'), | ||
expectedCss = grunt.file.read('test/expected/decrease/test.css'); | ||
var actualJs = getNormalizedFile('tmp/decrease/test.js'), | ||
actualCss = getNormalizedFile('tmp/decrease/test.css'), | ||
expectedJs = getNormalizedFile('test/expected/decrease/test.js'), | ||
expectedCss = getNormalizedFile('test/expected/decrease/test.css'); | ||
@@ -38,4 +42,4 @@ test.expect(2); | ||
jsfile: function(test) { | ||
var actualJs = grunt.file.read('tmp/test.js'), | ||
expectedJs = grunt.file.read('test/expected/test.js'); | ||
var actualJs = getNormalizedFile('tmp/test.js'), | ||
expectedJs = getNormalizedFile('test/expected/test.js'); | ||
@@ -42,0 +46,0 @@ test.expect(1); |
12685
262
88