 crypto = require 'crypto'
 fs = require 'fs-plus'
 path = require 'path'
-to5 = require '6to5-core'
+to5 = null # Defer until used
 
 stats =
   hits: 0

  updateDigestForJsonValue(shasum, options)
  shasum.digest('hex')

cacheDir = path.join(fs.absolute('~/.atom'), 'compile-cache')
jsCacheDir = path.join(cacheDir, 'js', '6to5', create6to5VersionAndOptionsDigest(to5.version, defaultOptions))

getCachePath = (sourceCode) ->
  digest = crypto.createHash('sha1').update(sourceCode, 'utf8').digest('hex')
  path.join(jsCacheDir, "#{digest}.js")

getCachedJavaScript = (cachePath) ->


transpile = (sourceCode, filePath, cachePath) ->
  options = createOptions(filePath)
  to5 ?= require '6to5-core'
  js = to5.transform(sourceCode, options).code
  stats.misses++

