From 22db12f2a37529a560eda1839c3a23011f900fab Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 8 Oct 2017 13:58:01 +0900 Subject: move messages to shared --- src/actions/operation.js | 2 +- src/actions/setting.js | 2 +- src/background/index.js | 2 +- src/components/background.js | 2 +- src/components/console.js | 2 +- src/components/follow.js | 2 +- src/content/index.js | 2 +- src/content/messages.js | 16 ---------------- src/pages/console.js | 2 +- src/shared/messages.js | 16 ++++++++++++++++ 10 files changed, 24 insertions(+), 24 deletions(-) delete mode 100644 src/content/messages.js create mode 100644 src/shared/messages.js diff --git a/src/actions/operation.js b/src/actions/operation.js index 0bb8310..8b1590b 100644 --- a/src/actions/operation.js +++ b/src/actions/operation.js @@ -1,5 +1,5 @@ import operations from 'shared/operations'; -import messages from 'content/messages'; +import messages from 'shared/messages'; import * as tabs from 'background/tabs'; import * as zooms from 'background/zooms'; import * as scrolls from 'content/scrolls'; diff --git a/src/actions/setting.js b/src/actions/setting.js index 2a47608..c241428 100644 --- a/src/actions/setting.js +++ b/src/actions/setting.js @@ -1,5 +1,5 @@ import actions from 'actions'; -import messages from 'content/messages'; +import messages from 'shared/messages'; import DefaultSettings from 'shared/default-settings'; const load = () => { diff --git a/src/background/index.js b/src/background/index.js index dbc10fb..63d13cb 100644 --- a/src/background/index.js +++ b/src/background/index.js @@ -1,5 +1,5 @@ import * as settingsActions from 'actions/setting'; -import messages from 'content/messages'; +import messages from 'shared/messages'; import BackgroundComponent from 'components/background'; import reducers from 'reducers'; import { createStore } from 'store'; diff --git a/src/components/background.js b/src/components/background.js index 4961d85..afb90c2 100644 --- a/src/components/background.js +++ b/src/components/background.js @@ -1,4 +1,4 @@ -import messages from 'content/messages'; +import messages from 'shared/messages'; import * as operationActions from 'actions/operation'; import * as settingsActions from 'actions/setting'; import * as tabActions from 'actions/tab'; diff --git a/src/components/console.js b/src/components/console.js index 12341c1..20d15c2 100644 --- a/src/components/console.js +++ b/src/components/console.js @@ -1,4 +1,4 @@ -import messages from 'content/messages'; +import messages from 'shared/messages'; import * as consoleActions from 'actions/console'; export default class ConsoleComponent { diff --git a/src/components/follow.js b/src/components/follow.js index eedbd4d..0ec1e87 100644 --- a/src/components/follow.js +++ b/src/components/follow.js @@ -1,5 +1,5 @@ import * as followActions from 'actions/follow'; -import messages from 'content/messages'; +import messages from 'shared/messages'; import Hint from 'content/hint'; import HintKeyProducer from 'content/hint-key-producer'; diff --git a/src/content/index.js b/src/content/index.js index d380291..25a2e74 100644 --- a/src/content/index.js +++ b/src/content/index.js @@ -6,7 +6,7 @@ import ContentInputComponent from 'components/content-input'; import KeymapperComponent from 'components/keymapper'; import FollowComponent from 'components/follow'; import reducers from 'reducers'; -import messages from './messages'; +import messages from 'shared/messages'; const store = createStore(reducers); const followComponent = new FollowComponent(window.document.body, store); diff --git a/src/content/messages.js b/src/content/messages.js deleted file mode 100644 index 138f0e0..0000000 --- a/src/content/messages.js +++ /dev/null @@ -1,16 +0,0 @@ -export default { - SETTINGS_QUERY: 'settings.query', - - BACKGROUND_OPERATION: 'background.operation', - - CONSOLE_BLURRED: 'console.blured', - CONSOLE_ENTERED: 'console.entered', - CONSOLE_QUERY_COMPLETIONS: 'console.query.completions', - CONSOLE_SHOW_COMMAND: 'console.show.command', - CONSOLE_SHOW_ERROR: 'console.show.error', - CONSOLE_HIDE: 'console.hide', - - OPEN_URL: 'open.url', - - SETTINGS_RELOAD: 'settings.reload', -}; diff --git a/src/pages/console.js b/src/pages/console.js index b7be73d..4c6e16c 100644 --- a/src/pages/console.js +++ b/src/pages/console.js @@ -1,5 +1,5 @@ import './console.scss'; -import messages from 'content/messages'; +import messages from 'shared/messages'; import CompletionComponent from 'components/completion'; import ConsoleComponent from 'components/console'; import reducers from 'reducers'; diff --git a/src/shared/messages.js b/src/shared/messages.js new file mode 100644 index 0000000..138f0e0 --- /dev/null +++ b/src/shared/messages.js @@ -0,0 +1,16 @@ +export default { + SETTINGS_QUERY: 'settings.query', + + BACKGROUND_OPERATION: 'background.operation', + + CONSOLE_BLURRED: 'console.blured', + CONSOLE_ENTERED: 'console.entered', + CONSOLE_QUERY_COMPLETIONS: 'console.query.completions', + CONSOLE_SHOW_COMMAND: 'console.show.command', + CONSOLE_SHOW_ERROR: 'console.show.error', + CONSOLE_HIDE: 'console.hide', + + OPEN_URL: 'open.url', + + SETTINGS_RELOAD: 'settings.reload', +}; -- cgit v1.2.3