Skip to content

Commit

Permalink
standardized module structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Maizify committed Sep 26, 2016
1 parent 0de1277 commit 761c8a3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
4 changes: 2 additions & 2 deletions dist/vconsole.min.js

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions src/log/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,4 @@ class VConsoleDefaultTab extends VConsoleLogTab {

} // END class

const tab = new VConsoleDefaultTab('default', 'Log');

export default tab;
export default VConsoleDefaultTab;
6 changes: 2 additions & 4 deletions src/log/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as tool from '../lib/tool.js';
import VConsoleLogTab from './log.js';
import tplTabbox from './tabbox_system.html';

class VConsoleDefaultTab extends VConsoleLogTab {
class VConsoleSystemTab extends VConsoleLogTab {

constructor(...args) {
super(...args);
Expand Down Expand Up @@ -129,6 +129,4 @@ class VConsoleDefaultTab extends VConsoleLogTab {

} // END class

const tab = new VConsoleDefaultTab('system', 'System');

export default tab;
export default VConsoleSystemTab;
5 changes: 1 addition & 4 deletions src/network/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,4 @@ class VConsoleNetworkTab extends VConsolePlugin {

} // END class


const tab = new VConsoleNetworkTab('network', 'Network');

export default tab;
export default VConsoleNetworkTab;
14 changes: 10 additions & 4 deletions src/vconsole.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@
// classes
import VConsole from './core/core.js';
import VConsolePlugin from './lib/plugin.js';
// default tabs
import defaultTab from './log/default.js';
import systemTab from './log/system.js';
import networkTab from './network/network.js';
// built-in tabs
import VConsoleDefaultTab from './log/default.js';
import VConsoleSystemTab from './log/system.js';
import VConsoleNetworkTab from './network/network.js';

// here we go
const vConsole = new VConsole();

const defaultTab = new VConsoleDefaultTab('default', 'Log');
vConsole.addPlugin(defaultTab);

const systemTab = new VConsoleSystemTab('system', 'System');
vConsole.addPlugin(systemTab);

const networkTab = new VConsoleNetworkTab('network', 'Network');
vConsole.addPlugin(networkTab);

// export
Expand Down

0 comments on commit 761c8a3

Please sign in to comment.