This commit is contained in:
Kevin Sawicki
2015-02-02 14:10:53 -08:00
parent 18ed76f111
commit 9858916c31

View File

@@ -61,15 +61,15 @@ module.exports =
})
addPathToCache: (filePath) ->
extension = path.extname(filePath)
if extension is '.coffee'
content = fs.readFileSync(filePath, 'utf8')
cachePath = getCachePath(coffee)
compileCoffeeScript(coffee, filePath, cachePath)
else if extension is '.cson'
CSON.readFileSync(filePath)
else if extension is '.js'
require('./6to5').addPathToCache(filePath)
switch path.extname(filePath)
when '.coffee'
content = fs.readFileSync(filePath, 'utf8')
cachePath = getCachePath(coffee)
compileCoffeeScript(coffee, filePath, cachePath)
when '.cson'
CSON.readFileSync(filePath)
when '.js'
require('./6to5').addPathToCache(filePath)
getCacheMisses: -> stats.misses