mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Make ConfigObserver a proper mixin and export it
This commit is contained in:
@@ -8,6 +8,7 @@ module.exports =
|
||||
File: require '../src/file'
|
||||
fs: require 'fs-plus'
|
||||
Git: require '../src/git'
|
||||
ConfigObserver: require '../src/config-observer'
|
||||
Point: Point
|
||||
Range: Range
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
Mixin = require 'mixto'
|
||||
|
||||
module.exports =
|
||||
class ConfigObserver extends Mixin
|
||||
observeConfig: (keyPath, args...) ->
|
||||
@configSubscriptions ?= {}
|
||||
@configSubscriptions[keyPath] = atom.config.observe(keyPath, args...)
|
||||
|
||||
@@ -15,7 +15,7 @@ ConfigObserver = require './config-observer'
|
||||
module.exports =
|
||||
class DisplayBuffer extends Model
|
||||
Serializable.includeInto(this)
|
||||
_.extend @prototype, ConfigObserver
|
||||
ConfigObserver.includeInto(this)
|
||||
|
||||
@properties
|
||||
softWrap: null
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
_ = require 'underscore-plus'
|
||||
spacePen = require 'space-pen'
|
||||
ConfigObserver = require './config-observer'
|
||||
{Subscriber} = require 'emissary'
|
||||
ConfigObserver = require './config-observer'
|
||||
|
||||
_.extend spacePen.View.prototype, ConfigObserver
|
||||
ConfigObserver.includeInto(spacePen.View)
|
||||
Subscriber.includeInto(spacePen.View)
|
||||
|
||||
jQuery = spacePen.jQuery
|
||||
|
||||
Reference in New Issue
Block a user