grunt/modules/file.js in ustyle-1.15.3 vs grunt/modules/file.js in ustyle-1.16.1

- old
+ new

@@ -1,26 +1,24 @@ -"use strict"; +const grunt = require('grunt') -var grunt = require('grunt'); - module.exports = { - writeFile: function(file, dest, message){ - var outputType = 'created', - oldFile = null; + writeFile: function (file, dest, message) { + var outputType = 'created' + var oldFile = null if (grunt.file.exists(dest)) { - outputType = 'overwritten'; - oldFile = grunt.file.read(dest); + outputType = 'overwritten' + oldFile = grunt.file.read(dest) } if (oldFile !== file) { - grunt.file.write(dest, file); - grunt.log.writeln('✓ '+ message +' ' + outputType + ' at: ' + grunt.log.wordlist([dest], {color: 'cyan'})); + grunt.file.write(dest, file) + grunt.log.writeln('✓ ' + message + ' ' + outputType + ' at: ' + grunt.log.wordlist([dest], {color: 'cyan'})) } else { - grunt.log.writeln('‣ '+ message +' unchanged'); + grunt.log.writeln('‣ ' + message + ' unchanged') } }, - isMarkdown: function(extension){ - return extension === ".md"; + isMarkdown: function (extension) { + return extension === '.md' } }