'use strict'

const childProcess = require('child_process')
const fs = require('fs')

const promisify = require('promisify-function').default

function exec (command, options) {
  return new Promise(function (resolve, reject) {
    childProcess.exec(command, options, function (err, stdout, stderr) {
      if (err) {
        reject(err)
      } else {
        resolve({command, stdout, stderr})
      }
    })
  })
}

function exists (path) {
  return new Promise(function (resolve, reject) {
    fs.exists(path, function (exists) {
      if (exists) {
        resolve()
      } else {
        reject()
      }
    })
  })
}

module.exports = {
  exec,
  exists,
  mkdir: promisify(fs.mkdir),
  readFile: promisify(fs.readFile)
}

@@ -1,22 +1,9 @@
-'use strict'%0A%0Acons
+impor
 t ch
@@ -13,26 +13,21 @@
 Process 
-= require(
+from 
 'child_p
@@ -37,40 +37,35 @@
 ess'
-)%0Aconst fs = require(
+%0Aimport fs from 
 'fs'
-)
 %0A%0A
-cons
+impor
 t pr
@@ -76,18 +76,13 @@
 ify 
-= require(
+from 
 'pro
@@ -101,17 +101,83 @@
 ion'
-).default
+%0A%0Aconst mkdir = promisify(fs.mkdir)%0Aconst readFile = promisify(fs.readFile)
 %0A%0Afu
@@ -662,44 +662,30 @@
 %0A%7D%0A%0A
-module.exports = %7B%0A 
+export %7B
  exec,
-%0A 
  exists,
 %0A  m
@@ -684,72 +684,23 @@
 sts,
-%0A 
  mkdir
-: promisify(fs.mkdir),%0A  readFile: promisify(fs.readFile)%0A
+, readFile 
 %7D%0A

Update util to es2015