mirror of
https://github.com/atom/atom.git
synced 2026-01-22 13:28:01 -05:00
Add addPathToCache helper for apm to warm using
This commit is contained in:
committed by
Kevin Sawicki
parent
d1f3d7d51e
commit
f0cffcbd84
@@ -45,3 +45,11 @@ module.exports =
|
||||
writable: false
|
||||
value: requireCoffeeScript
|
||||
})
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user