|
|
@ -3,7 +3,7 @@ |
|
|
|
var CONFIG_FILE = '.remix.config' |
|
|
|
var CONFIG_FILE = '.remix.config' |
|
|
|
const EventEmitter = require('events') |
|
|
|
const EventEmitter = require('events') |
|
|
|
|
|
|
|
|
|
|
|
function Config (storage) { |
|
|
|
function Config(storage) { |
|
|
|
this.items = {} |
|
|
|
this.items = {} |
|
|
|
this.unpersistedItems = {} |
|
|
|
this.unpersistedItems = {} |
|
|
|
this.events = new EventEmitter() |
|
|
|
this.events = new EventEmitter() |
|
|
@ -30,6 +30,7 @@ function Config (storage) { |
|
|
|
this.items[key] = content |
|
|
|
this.items[key] = content |
|
|
|
try { |
|
|
|
try { |
|
|
|
storage.set(CONFIG_FILE, JSON.stringify(this.items)) |
|
|
|
storage.set(CONFIG_FILE, JSON.stringify(this.items)) |
|
|
|
|
|
|
|
this.events.emit('configChanged', { key, content }) |
|
|
|
this.events.emit(key + '_changed', content) |
|
|
|
this.events.emit(key + '_changed', content) |
|
|
|
} catch (exception) { |
|
|
|
} catch (exception) { |
|
|
|
/* Do nothing. */ |
|
|
|
/* Do nothing. */ |
|
|
|