💄 The atom object is no accessable in browser process.

This commit is contained in:
Cheng Zhao 2013-10-21 21:59:03 +08:00
parent 94f441e123
commit 640b6feb49
2 changed files with 7 additions and 2 deletions

View File

@ -1,12 +1,14 @@
crypto = require 'crypto'
fs = require 'fs'
path = require 'path'
os = require 'os'
CoffeeScript = require 'coffee-script'
CSON = require 'season'
mkdir = require('mkdirp').sync
cacheDir = path.join(atom.getTempDirPath(), 'atom-compile-cache')
tmpDir = if process.platform is 'win32' then os.tmpdir() else '/tmp'
cacheDir = path.join(tmpDir, 'atom-compile-cache')
coffeeCacheDir = path.join(cacheDir, 'coffee')
CSON.setCacheDir(path.join(cacheDir, 'cson'))

View File

@ -1,12 +1,15 @@
path = require 'path'
os = require 'os'
LessCache = require 'less-cache'
{Subscriber} = require 'emissary'
tmpDir = if process.platform is 'win32' then os.tmpdir() else '/tmp'
module.exports =
class LessCompileCache
Subscriber.includeInto(this)
@cacheDir: path.join(atom.getTempDirPath(), 'atom-compile-cache', 'less')
@cacheDir: path.join(tmpDir, 'atom-compile-cache', 'less')
constructor: ->
@cache = new LessCache