Sha256: 72031016d0b77943edfc8d2f55aa76c2be9f3660cca37e0d44a7defba26673e7

Contents?: true

Size: 601 Bytes

Versions: 8

Compression:

Stored size: 601 Bytes

Contents

const grunt = require('grunt')

module.exports = {
  writeFile: function (file, dest, message) {
    var outputType = 'created'
    var oldFile = null

    if (grunt.file.exists(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'}))
    } else {
      grunt.log.writeln('‣ ' + message + ' unchanged')
    }
  },

  isMarkdown: function (extension) {
    return extension === '.md'
  }
}

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
reustyle-2.0.11 grunt/modules/file.js
reustyle-2.0.10 grunt/modules/file.js
reustyle-2.0.9 grunt/modules/file.js
reustyle-2.0.8 grunt/modules/file.js
reustyle-2.0.7 grunt/modules/file.js
ustyle-1.19.2 grunt/modules/file.js
ustyle-1.16.2 grunt/modules/file.js
ustyle-1.16.1 grunt/modules/file.js