mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2025-01-04 21:28:48 +03:00
Add addPathToCache helper for apm to warm using
This commit is contained in:
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)
|
||||
|
Loading…
Reference in New Issue
Block a user