From c0a5e0d7155d2e740b7d9ede4064265b98a1ba70 Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Sun, 13 Dec 2015 23:33:42 -0800 Subject: [PATCH] refactor(extensions): Move extensions outside of flux/ folder Not really related to flux, makes more sense to be inside src/ --- spec/stores/draft-store-spec.coffee | 2 +- src/extension-registry.es6 | 2 +- src/{flux => }/extensions/composer-extension-adapter.coffee | 4 ++-- src/{flux => }/extensions/composer-extension.coffee | 0 src/{flux => }/extensions/contenteditable-extension.coffee | 0 src/{flux => }/extensions/message-view-extension.coffee | 0 src/global/nylas-exports.coffee | 6 +++--- 7 files changed, 7 insertions(+), 7 deletions(-) rename src/{flux => }/extensions/composer-extension-adapter.coffee (94%) rename src/{flux => }/extensions/composer-extension.coffee (100%) rename src/{flux => }/extensions/contenteditable-extension.coffee (100%) rename src/{flux => }/extensions/message-view-extension.coffee (100%) diff --git a/spec/stores/draft-store-spec.coffee b/spec/stores/draft-store-spec.coffee index fedf8a3fc..592622131 100644 --- a/spec/stores/draft-store-spec.coffee +++ b/spec/stores/draft-store-spec.coffee @@ -6,7 +6,7 @@ ModelQuery = require '../../src/flux/models/query' AccountStore = require '../../src/flux/stores/account-store' DatabaseStore = require '../../src/flux/stores/database-store' DraftStore = require '../../src/flux/stores/draft-store' -ComposerExtension = require '../../flux/src/extensions/composer-extension' +ComposerExtension = require '../../src/extensions/composer-extension' SendDraftTask = require '../../src/flux/tasks/send-draft' DestroyDraftTask = require '../../src/flux/tasks/destroy-draft' SoundRegistry = require '../../src/sound-registry' diff --git a/src/extension-registry.es6 b/src/extension-registry.es6 index b72ba1192..bd4a10396 100644 --- a/src/extension-registry.es6 +++ b/src/extension-registry.es6 @@ -55,7 +55,7 @@ Registry.include(Listener); export const Composer = new Registry( 'Composer', - require('./flux/extensions/composer-extension-adapter') + require('./extensions/composer-extension-adapter') ); export const MessageView = new Registry( diff --git a/src/flux/extensions/composer-extension-adapter.coffee b/src/extensions/composer-extension-adapter.coffee similarity index 94% rename from src/flux/extensions/composer-extension-adapter.coffee rename to src/extensions/composer-extension-adapter.coffee index e83ad006a..5aa77db17 100644 --- a/src/flux/extensions/composer-extension-adapter.coffee +++ b/src/extensions/composer-extension-adapter.coffee @@ -1,6 +1,6 @@ _ = require 'underscore' -{deprecate} = require '../../deprecate-utils' -DOMUtils = require '../../dom-utils' +{deprecate} = require '../deprecate-utils' +DOMUtils = require '../dom-utils' ComposerExtensionAdapter = (extension) -> diff --git a/src/flux/extensions/composer-extension.coffee b/src/extensions/composer-extension.coffee similarity index 100% rename from src/flux/extensions/composer-extension.coffee rename to src/extensions/composer-extension.coffee diff --git a/src/flux/extensions/contenteditable-extension.coffee b/src/extensions/contenteditable-extension.coffee similarity index 100% rename from src/flux/extensions/contenteditable-extension.coffee rename to src/extensions/contenteditable-extension.coffee diff --git a/src/flux/extensions/message-view-extension.coffee b/src/extensions/message-view-extension.coffee similarity index 100% rename from src/flux/extensions/message-view-extension.coffee rename to src/extensions/message-view-extension.coffee diff --git a/src/global/nylas-exports.coffee b/src/global/nylas-exports.coffee index 52e93f4f9..0fadd4f15 100644 --- a/src/global/nylas-exports.coffee +++ b/src/global/nylas-exports.coffee @@ -133,9 +133,9 @@ class NylasExports # Extensions @require "ExtensionRegistry", 'extension-registry' - @require "ContenteditableExtension", 'flux/extensions/contenteditable-extension' - @require "ComposerExtension", 'flux/extensions/composer-extension' - @require "MessageViewExtension", 'flux/extensions/message-view-extension' + @require "ContenteditableExtension", 'extensions/contenteditable-extension' + @require "ComposerExtension", 'extensions/composer-extension' + @require "MessageViewExtension", 'extensions/message-view-extension' # React Components @get "React", -> require 'react' # Our version of React for 3rd party use