mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2025-01-04 04:55:06 +03:00
Make ConfigObserver a proper mixin and export it
This commit is contained in:
parent
b380551e5e
commit
8ca8ac5efc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user