separate content

jh-changes
Shin'ya Ueoka 7 years ago
parent d886d7de29
commit 39fb540037
  1. 2
      src/content/actions/follow.js
  2. 0
      src/content/actions/index.js
  3. 2
      src/content/actions/input.js
  4. 2
      src/content/actions/operation.js
  5. 0
      src/content/components/content-input.js
  6. 2
      src/content/components/follow.js
  7. 4
      src/content/components/keymapper.js
  8. 8
      src/content/index.js
  9. 2
      src/content/reducers/follow.js
  10. 4
      src/content/reducers/index.js
  11. 2
      src/content/reducers/input.js
  12. 4
      test/content/actions/follow.test.js
  13. 4
      test/content/actions/input.test.js
  14. 0
      test/content/components/follow.html
  15. 4
      test/content/components/follow.test.js
  16. 4
      test/content/reducers/follow.test.js
  17. 4
      test/content/reducers/input.test.js

@ -1,4 +1,4 @@
import actions from 'actions'; import actions from 'content/actions';
const enable = (newTab) => { const enable = (newTab) => {
return { return {

@ -1,4 +1,4 @@
import actions from 'actions'; import actions from 'content/actions';
const asKeymapChars = (key, ctrl) => { const asKeymapChars = (key, ctrl) => {
if (ctrl) { if (ctrl) {

@ -2,7 +2,7 @@ import operations from 'shared/operations';
import messages from 'shared/messages'; import messages from 'shared/messages';
import * as scrolls from 'content/scrolls'; import * as scrolls from 'content/scrolls';
import * as navigates from 'content/navigates'; import * as navigates from 'content/navigates';
import * as followActions from 'actions/follow'; import * as followActions from 'content/actions/follow';
const exec = (operation) => { const exec = (operation) => {
switch (operation.type) { switch (operation.type) {

@ -1,4 +1,4 @@
import * as followActions from 'actions/follow'; import * as followActions from 'content/actions/follow';
import messages from 'shared/messages'; import messages from 'shared/messages';
import Hint from 'content/hint'; import Hint from 'content/hint';
import HintKeyProducer from 'content/hint-key-producer'; import HintKeyProducer from 'content/hint-key-producer';

@ -1,5 +1,5 @@
import * as inputActions from 'actions/input'; import * as inputActions from 'content/actions/input';
import * as operationActions from 'actions/operation'; import * as operationActions from 'content/actions/operation';
export default class KeymapperComponent { export default class KeymapperComponent {
constructor(store) { constructor(store) {

@ -2,10 +2,10 @@ import './console-frame.scss';
import * as consoleFrames from './console-frames'; import * as consoleFrames from './console-frames';
import * as settingActions from 'settings/actions/setting'; import * as settingActions from 'settings/actions/setting';
import { createStore } from 'store'; import { createStore } from 'store';
import ContentInputComponent from 'components/content-input'; import ContentInputComponent from 'content/components/content-input';
import KeymapperComponent from 'components/keymapper'; import KeymapperComponent from 'content/components/keymapper';
import FollowComponent from 'components/follow'; import FollowComponent from 'content/components/follow';
import reducers from 'reducers'; import reducers from 'content/reducers';
import messages from 'shared/messages'; import messages from 'shared/messages';
const store = createStore(reducers); const store = createStore(reducers);

@ -1,4 +1,4 @@
import actions from 'actions'; import actions from 'content/actions';
const defaultState = { const defaultState = {
enabled: false, enabled: false,

@ -1,6 +1,6 @@
import inputReducer from 'reducers/input';
import settingReducer from 'settings/reducers/setting'; 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 // Make setting reducer instead of re-use
const defaultState = { const defaultState = {

@ -1,4 +1,4 @@
import actions from 'actions'; import actions from 'content/actions';
const defaultState = { const defaultState = {
keys: '', keys: '',

@ -1,6 +1,6 @@
import { expect } from "chai"; import { expect } from "chai";
import actions from 'actions'; import actions from 'content/actions';
import * as followActions from 'actions/follow'; import * as followActions from 'content/actions/follow';
describe('follow actions', () => { describe('follow actions', () => {
describe('enable', () => { describe('enable', () => {

@ -1,6 +1,6 @@
import { expect } from "chai"; import { expect } from "chai";
import actions from 'actions'; import actions from 'content/actions';
import * as inputActions from 'actions/input'; import * as inputActions from 'content/actions/input';
describe("input actions", () => { describe("input actions", () => {
describe("keyPress", () => { describe("keyPress", () => {

@ -1,10 +1,10 @@
import { expect } from "chai"; import { expect } from "chai";
import FollowComponent from 'components/follow'; import FollowComponent from 'content/components/follow';
describe('FollowComponent', () => { describe('FollowComponent', () => {
describe('#getTargetElements', () => { describe('#getTargetElements', () => {
beforeEach(() => { beforeEach(() => {
document.body.innerHTML = __html__['test/components/follow.html']; document.body.innerHTML = __html__['test/content/components/follow.html'];
}); });
it('returns visible links', () => { it('returns visible links', () => {

@ -1,6 +1,6 @@
import { expect } from "chai"; import { expect } from "chai";
import actions from 'actions'; import actions from 'content/actions';
import followReducer from 'reducers/follow'; import followReducer from 'content/reducers/follow';
describe('follow reducer', () => { describe('follow reducer', () => {
it ('returns the initial state', () => { it ('returns the initial state', () => {

@ -1,6 +1,6 @@
import { expect } from "chai"; import { expect } from "chai";
import actions from 'actions'; import actions from 'content/actions';
import inputReducer from 'reducers/input'; import inputReducer from 'content/reducers/input';
describe("input reducer", () => { describe("input reducer", () => {
it('return the initial state', () => { it('return the initial state', () => {