Skip to content

Commit 99e0d12

Browse files
committed
restructure based on airbnb react style guide
1 parent 2e0e278 commit 99e0d12

File tree

131 files changed

+278
-796
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+278
-796
lines changed

lib/actions/actionTypes.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

lib/actions/actions.js

Lines changed: 0 additions & 55 deletions
This file was deleted.
File renamed without changes.

lib/actions/page-actions.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

lib/actions/progress-actions.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

lib/actions/routes.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

lib/actions/task-actions.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

lib/actions/tutorials.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

lib/atom/main.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
'use strict';
22
var render_1 = require('../components/render');
3+
var mount_1 = require('../components/mount');
34
var polyfills_1 = require('../services/polyfills');
45
var subscriptions_1 = require('./subscriptions');
56
var store_1 = require('../store/store');
6-
var _actions_1 = require('../actions/_actions');
7+
var actions_1 = require('../actions');
78
function setDir() {
89
if (atom.project.rootDirectories.length > 0) {
910
return atom.project.rootDirectories[0].path;
@@ -22,8 +23,8 @@ var Main = (function () {
2223
dir: setDir(),
2324
win: setWin()
2425
};
25-
store_1.store.dispatch(_actions_1.setupVerify());
26-
this.root = render_1.initRoot();
26+
store_1.store.dispatch(actions_1.setupVerify());
27+
this.root = mount_1.initRoot();
2728
}
2829
Main.prototype.activate = function () {
2930
atom.workspace.addRightPanel({
@@ -44,7 +45,7 @@ var Main = (function () {
4445
subscriptions_1.onDeactivate();
4546
};
4647
Main.prototype.toggle = function () {
47-
render_1.togglePanel();
48+
mount_1.togglePanel();
4849
};
4950
return Main;
5051
}());

lib/atom/subscriptions.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
"use strict";
22
var CompositeDisposable = require('atom').CompositeDisposable;
33
var store_1 = require('../store/store');
4-
var _actions_1 = require('../actions/_actions');
5-
var render_1 = require('../components/render');
4+
var actions_1 = require('../actions');
5+
var mount_1 = require('../components/mount');
66
var subscriptions = null;
77
function onActivate() {
88
subscriptions = new CompositeDisposable;
99
subscriptions.add(atom.commands.add('atom-workspace', {
10-
'cr-viewer:toggle': render_1.togglePanel
10+
'cr-viewer:toggle': mount_1.togglePanel
1111
}));
1212
atom.workspace.observeTextEditors(function (editor) {
1313
subscriptions.add(editor.onDidSave(function () {
14-
store_1.store.dispatch(_actions_1.testRun());
14+
store_1.store.dispatch(actions_1.testRun());
1515
}));
1616
});
1717
subscriptions.add(atom.commands.add('atom-workspace', {
1818
'cr-viewer:testRun': (function () {
1919
if (store_1.store.getState().route === 'page') {
20-
store_1.store.dispatch(_actions_1.testRun());
20+
store_1.store.dispatch(actions_1.testRun());
2121
}
2222
})
2323
}));
@@ -26,15 +26,15 @@ function onActivate() {
2626
exports.onActivate = onActivate;
2727
function onDeactivate() {
2828
window.onresize = null;
29-
render_1.unmount();
29+
mount_1.unmount();
3030
subscriptions.dispose();
3131
}
3232
exports.onDeactivate = onDeactivate;
3333
function addToStatusBar(statusBar) {
3434
var replay = document.createElement('div');
3535
replay.className = 'cr-alert-replay';
3636
replay.textContent = '▲';
37-
replay.onclick = function () { return store_1.store.dispatch(_actions_1.alertReplay()); };
37+
replay.onclick = function () { return store_1.store.dispatch(actions_1.alertReplay()); };
3838
return statusBar.addLeftTile({ item: replay, priority: 100 });
3939
}
4040
exports.addToStatusBar = addToStatusBar;

0 commit comments

Comments
 (0)