diff --git a/src/actions/operation.js b/src/actions/operation.js index 5646c1c..5b7f127 100644 --- a/src/actions/operation.js +++ b/src/actions/operation.js @@ -1,5 +1,5 @@ import operations from '../operations'; -import messages from '../messages'; +import messages from '../content/messages'; import * as consoleActions from './console'; import * as tabs from '../background/tabs'; import * as zooms from '../background/zooms'; diff --git a/src/background/index.js b/src/background/index.js index 5ae967c..0e75a36 100644 --- a/src/background/index.js +++ b/src/background/index.js @@ -5,7 +5,7 @@ import * as commandActions from '../actions/command'; import * as consoleActions from '../actions/console'; import * as tabActions from '../actions/tab'; import reducers from '../reducers'; -import messages from '../messages'; +import messages from '../content/messages'; import * as store from '../store'; let prevInput = []; diff --git a/src/console/console-frame.scss b/src/content/console-frame.scss similarity index 100% rename from src/console/console-frame.scss rename to src/content/console-frame.scss diff --git a/src/console/frames.js b/src/content/console-frames.js similarity index 100% rename from src/console/frames.js rename to src/content/console-frames.js diff --git a/src/content/index.js b/src/content/index.js index 812fbc5..2e64af2 100644 --- a/src/content/index.js +++ b/src/content/index.js @@ -1,10 +1,10 @@ -import '../console/console-frame.scss'; -import * as consoleFrames from '../console/frames'; +import './console-frame.scss'; +import * as consoleFrames from './console-frames'; import * as scrolls from '../content/scrolls'; import * as navigates from '../content/navigates'; import Follow from '../content/follow'; import operations from '../operations'; -import messages from '../messages'; +import messages from './messages'; consoleFrames.initialize(window.document); diff --git a/src/messages/index.js b/src/content/messages.js similarity index 100% rename from src/messages/index.js rename to src/content/messages.js diff --git a/src/console/completion.js b/src/pages/completion.js similarity index 100% rename from src/console/completion.js rename to src/pages/completion.js diff --git a/src/console/console.html b/src/pages/console.html similarity index 100% rename from src/console/console.html rename to src/pages/console.html diff --git a/src/console/console.js b/src/pages/console.js similarity index 99% rename from src/console/console.js rename to src/pages/console.js index 4471446..31f2643 100644 --- a/src/console/console.js +++ b/src/pages/console.js @@ -1,6 +1,6 @@ import './console.scss'; import Completion from './completion'; -import messages from '../messages'; +import messages from '../content/messages'; // TODO consider object-oriented let prevValue = ''; diff --git a/src/console/console.scss b/src/pages/console.scss similarity index 100% rename from src/console/console.scss rename to src/pages/console.scss diff --git a/src/settings/settings.html b/src/pages/settings.html similarity index 100% rename from src/settings/settings.html rename to src/pages/settings.html diff --git a/src/settings/index.js b/src/pages/settings.js similarity index 93% rename from src/settings/index.js rename to src/pages/settings.js index 2ed060c..6e00ed3 100644 --- a/src/settings/index.js +++ b/src/pages/settings.js @@ -1,5 +1,5 @@ import './settings.scss'; -import messages from '../messages'; +import messages from '../content/messages'; document.addEventListener('DOMContentLoaded', () => { let form = document.getElementById('vimvixen-settings-form'); diff --git a/src/settings/settings.scss b/src/pages/settings.scss similarity index 100% rename from src/settings/settings.scss rename to src/pages/settings.scss diff --git a/test/console/completion.test.js b/test/pages/completion.test.js similarity index 96% rename from test/console/completion.test.js rename to test/pages/completion.test.js index a789c15..28dd9a7 100644 --- a/test/console/completion.test.js +++ b/test/pages/completion.test.js @@ -1,5 +1,5 @@ import { expect } from "chai"; -import Completion from '../../src/console/completion'; +import Completion from '../../src/pages/completion'; describe('Completion class', () => { describe('#constructor', () => { diff --git a/webpack.config.js b/webpack.config.js index bf121d1..f1ba07a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -7,9 +7,9 @@ const dist = path.resolve(__dirname, 'build'); module.exports = { entry: { index: path.join(src, 'content'), - settings: path.join(src, 'settings'), + settings: path.join(src, 'pages/settings'), background: path.join(src, 'background'), - console: path.join(src, 'console', 'console.js') + console: path.join(src, 'pages', 'console.js') }, output: { @@ -44,12 +44,12 @@ module.exports = { plugins: [ new HtmlWebpackPlugin({ - template: path.join(src, 'console', 'console.html'), + template: path.join(src, 'pages', 'console.html'), filename: path.join(dist, 'console.html'), inject: false }), new HtmlWebpackPlugin({ - template: path.join(src, 'settings', 'settings.html'), + template: path.join(src, 'pages', 'settings.html'), filename: path.join(dist, 'settings.html'), inject: false })