diff --git a/src/actions/follow.js b/src/content/actions/follow.js similarity index 91% rename from src/actions/follow.js rename to src/content/actions/follow.js index 708cd95..5a18dd5 100644 --- a/src/actions/follow.js +++ b/src/content/actions/follow.js @@ -1,4 +1,4 @@ -import actions from 'actions'; +import actions from 'content/actions'; const enable = (newTab) => { return { diff --git a/src/actions/index.js b/src/content/actions/index.js similarity index 100% rename from src/actions/index.js rename to src/content/actions/index.js diff --git a/src/actions/input.js b/src/content/actions/input.js similarity index 90% rename from src/actions/input.js rename to src/content/actions/input.js index 61acb76..cc4efac 100644 --- a/src/actions/input.js +++ b/src/content/actions/input.js @@ -1,4 +1,4 @@ -import actions from 'actions'; +import actions from 'content/actions'; const asKeymapChars = (key, ctrl) => { if (ctrl) { diff --git a/src/actions/operation.js b/src/content/actions/operation.js similarity index 95% rename from src/actions/operation.js rename to src/content/actions/operation.js index a27cd02..d188a60 100644 --- a/src/actions/operation.js +++ b/src/content/actions/operation.js @@ -2,7 +2,7 @@ import operations from 'shared/operations'; import messages from 'shared/messages'; import * as scrolls from 'content/scrolls'; import * as navigates from 'content/navigates'; -import * as followActions from 'actions/follow'; +import * as followActions from 'content/actions/follow'; const exec = (operation) => { switch (operation.type) { diff --git a/src/components/content-input.js b/src/content/components/content-input.js similarity index 100% rename from src/components/content-input.js rename to src/content/components/content-input.js diff --git a/src/components/follow.js b/src/content/components/follow.js similarity index 98% rename from src/components/follow.js rename to src/content/components/follow.js index 0ec1e87..c87424d 100644 --- a/src/components/follow.js +++ b/src/content/components/follow.js @@ -1,4 +1,4 @@ -import * as followActions from 'actions/follow'; +import * as followActions from 'content/actions/follow'; import messages from 'shared/messages'; import Hint from 'content/hint'; import HintKeyProducer from 'content/hint-key-producer'; diff --git a/src/components/keymapper.js b/src/content/components/keymapper.js similarity index 89% rename from src/components/keymapper.js rename to src/content/components/keymapper.js index 3685a4f..8f2cead 100644 --- a/src/components/keymapper.js +++ b/src/content/components/keymapper.js @@ -1,5 +1,5 @@ -import * as inputActions from 'actions/input'; -import * as operationActions from 'actions/operation'; +import * as inputActions from 'content/actions/input'; +import * as operationActions from 'content/actions/operation'; export default class KeymapperComponent { constructor(store) { diff --git a/src/content/index.js b/src/content/index.js index edca510..00873cc 100644 --- a/src/content/index.js +++ b/src/content/index.js @@ -2,10 +2,10 @@ import './console-frame.scss'; import * as consoleFrames from './console-frames'; import * as settingActions from 'settings/actions/setting'; import { createStore } from 'store'; -import ContentInputComponent from 'components/content-input'; -import KeymapperComponent from 'components/keymapper'; -import FollowComponent from 'components/follow'; -import reducers from 'reducers'; +import ContentInputComponent from 'content/components/content-input'; +import KeymapperComponent from 'content/components/keymapper'; +import FollowComponent from 'content/components/follow'; +import reducers from 'content/reducers'; import messages from 'shared/messages'; const store = createStore(reducers); diff --git a/src/reducers/follow.js b/src/content/reducers/follow.js similarity index 94% rename from src/reducers/follow.js rename to src/content/reducers/follow.js index ed875e8..b7c0cf3 100644 --- a/src/reducers/follow.js +++ b/src/content/reducers/follow.js @@ -1,4 +1,4 @@ -import actions from 'actions'; +import actions from 'content/actions'; const defaultState = { enabled: false, diff --git a/src/reducers/index.js b/src/content/reducers/index.js similarity index 85% rename from src/reducers/index.js rename to src/content/reducers/index.js index 9c86ebf..a62217f 100644 --- a/src/reducers/index.js +++ b/src/content/reducers/index.js @@ -1,6 +1,6 @@ -import inputReducer from 'reducers/input'; import settingReducer from 'settings/reducers/setting'; -import followReducer from 'reducers/follow'; +import inputReducer from './input'; +import followReducer from './follow'; // Make setting reducer instead of re-use const defaultState = { diff --git a/src/reducers/input.js b/src/content/reducers/input.js similarity index 90% rename from src/reducers/input.js rename to src/content/reducers/input.js index 2e4bcd8..802020f 100644 --- a/src/reducers/input.js +++ b/src/content/reducers/input.js @@ -1,4 +1,4 @@ -import actions from 'actions'; +import actions from 'content/actions'; const defaultState = { keys: '', diff --git a/test/actions/follow.test.js b/test/content/actions/follow.test.js similarity index 90% rename from test/actions/follow.test.js rename to test/content/actions/follow.test.js index 32ab9e2..3ac844c 100644 --- a/test/actions/follow.test.js +++ b/test/content/actions/follow.test.js @@ -1,6 +1,6 @@ import { expect } from "chai"; -import actions from 'actions'; -import * as followActions from 'actions/follow'; +import actions from 'content/actions'; +import * as followActions from 'content/actions/follow'; describe('follow actions', () => { describe('enable', () => { diff --git a/test/actions/input.test.js b/test/content/actions/input.test.js similarity index 88% rename from test/actions/input.test.js rename to test/content/actions/input.test.js index 0a2ab18..6031829 100644 --- a/test/actions/input.test.js +++ b/test/content/actions/input.test.js @@ -1,6 +1,6 @@ import { expect } from "chai"; -import actions from 'actions'; -import * as inputActions from 'actions/input'; +import actions from 'content/actions'; +import * as inputActions from 'content/actions/input'; describe("input actions", () => { describe("keyPress", () => { diff --git a/test/components/follow.html b/test/content/components/follow.html similarity index 100% rename from test/components/follow.html rename to test/content/components/follow.html diff --git a/test/components/follow.test.js b/test/content/components/follow.test.js similarity index 69% rename from test/components/follow.test.js rename to test/content/components/follow.test.js index 294bfc9..9c00c79 100644 --- a/test/components/follow.test.js +++ b/test/content/components/follow.test.js @@ -1,10 +1,10 @@ import { expect } from "chai"; -import FollowComponent from 'components/follow'; +import FollowComponent from 'content/components/follow'; describe('FollowComponent', () => { describe('#getTargetElements', () => { beforeEach(() => { - document.body.innerHTML = __html__['test/components/follow.html']; + document.body.innerHTML = __html__['test/content/components/follow.html']; }); it('returns visible links', () => { diff --git a/test/reducers/follow.test.js b/test/content/reducers/follow.test.js similarity index 94% rename from test/reducers/follow.test.js rename to test/content/reducers/follow.test.js index e1db680..e2b3445 100644 --- a/test/reducers/follow.test.js +++ b/test/content/reducers/follow.test.js @@ -1,6 +1,6 @@ import { expect } from "chai"; -import actions from 'actions'; -import followReducer from 'reducers/follow'; +import actions from 'content/actions'; +import followReducer from 'content/reducers/follow'; describe('follow reducer', () => { it ('returns the initial state', () => { diff --git a/test/reducers/input.test.js b/test/content/reducers/input.test.js similarity index 90% rename from test/reducers/input.test.js rename to test/content/reducers/input.test.js index 7b5a89c..d5e5f6b 100644 --- a/test/reducers/input.test.js +++ b/test/content/reducers/input.test.js @@ -1,6 +1,6 @@ import { expect } from "chai"; -import actions from 'actions'; -import inputReducer from 'reducers/input'; +import actions from 'content/actions'; +import inputReducer from 'content/reducers/input'; describe("input reducer", () => { it('return the initial state', () => {