Skip to content

Commit 163c3ff

Browse files
committed
edits, refactoring
1 parent 0c36701 commit 163c3ff

File tree

12 files changed

+7
-39
lines changed

12 files changed

+7
-39
lines changed

keymaps/cr.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"atom-workspace": {
3-
"ctrl-alt-0": "cr-viewer:toggle",
4-
"ctrl-alt-9": "cr-viewer:runTests"
3+
"ctrl-alt-0": "cr-viewer:toggle"
54
}
65
}

lib/atom/subscriptions.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,10 @@ function onActivate() {
1414
store_1.default.dispatch(actions_1.testRun());
1515
}));
1616
});
17-
subscriptions.add(atom.commands.add('atom-workspace', {
18-
'cr-viewer:testRun': function () {
19-
if (store_1.default.getState().route === 'page') {
20-
store_1.default.dispatch(actions_1.testRun());
21-
}
22-
},
23-
}));
2417
return subscriptions;
2518
}
2619
exports.onActivate = onActivate;
2720
function onDeactivate() {
28-
window.onresize = null;
2921
root_1.default.unmount();
3022
subscriptions.dispose();
3123
}
File renamed without changes.

lib/components/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ var AppMenu_1 = require('./AppMenu');
55
exports.AppMenu = AppMenu_1.default;
66
var FinalPage_1 = require('./FinalPage');
77
exports.FinalPage = FinalPage_1.default;
8-
var Markdown_1 = require('./Markdown');
9-
exports.Markdown = Markdown_1.default;
108
var Page_1 = require('./Page');
119
exports.Page = Page_1.default;
1210
var Progress_1 = require('./Progress');
@@ -17,6 +15,8 @@ var Start_1 = require('./Start');
1715
exports.Start = Start_1.default;
1816
var Tutorials_1 = require('./Tutorials');
1917
exports.Tutorials = Tutorials_1.default;
18+
var Markdown_1 = require('./common/Markdown');
19+
exports.Markdown = Markdown_1.default;
2020
var RouteButton_1 = require('./common/RouteButton');
2121
exports.RouteButton = RouteButton_1.default;
2222
var ContentCard_1 = require('./common/ContentCard');

lib/reducers/task-actions/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@ var _types_1 = require('../../actions/_types');
33
var editor_reducer_1 = require('./editor-reducer');
44
var store_1 = require('../../store');
55
function handleTaskActions(actions) {
6-
console.log('actions', actions);
76
var next = actions.shift();
8-
console.log('next', next);
97
if (next && next.length) {
108
next.reduce(function (total, curr) {
11-
console.log('total, curr', total, curr);
129
return total.then(function () { return editor_reducer_1.default(curr); });
1310
}, Promise.resolve());
1411
}
@@ -35,7 +32,6 @@ function taskActionsReducer(taskActions, action) {
3532
return actions;
3633
case _types_1.TEST_RESULT:
3734
actions = action.payload.actions || [];
38-
console.log('TEST_RESULT actions', actions);
3935
var nextTaskPosition = action.payload.result.taskPosition;
4036
var times = nextTaskPosition - taskTracker;
4137
if (times > 0) {

lib/store/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
var redux_1 = require('redux');
33
var reducers_1 = require('../reducers');
44
var createLogger = require('redux-logger');
5-
var devMode = true;
5+
var devMode = false;
66
var store = null;
77
if (devMode) {
88
var logger = createLogger();

src/atom/subscriptions.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,6 @@ export function onActivate(): AtomCore.Disposable {
2222
store.dispatch(testRun());
2323
}));
2424
});
25-
/**
26-
* Key subscriptions
27-
*/
28-
subscriptions.add(
29-
// run tests on hot key. See keymaps
30-
atom.commands.add('atom-workspace', {
31-
'cr-viewer:testRun': () => {
32-
if (store.getState().route === 'page') {
33-
store.dispatch(testRun());
34-
}
35-
},
36-
})
37-
);
3825
return subscriptions;
3926
}
4027

src/components/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
export {default as Alert} from './Alert';
22
export {default as AppMenu} from './AppMenu';
33
export {default as FinalPage} from './FinalPage';
4-
export {default as Markdown} from './Markdown';
54
export {default as Page} from './Page';
65
export {default as Progress} from './Progress';
76
export {default as Routes} from './Routes';
87
export {default as Start} from './Start';
98
export {default as Tutorials} from './Tutorials';
9+
export {default as Markdown} from './common/Markdown';
1010
export {default as RouteButton} from './common/RouteButton';
1111
export {default as ContentCard} from './common/ContentCard';

src/typings/cr/cr.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ declare namespace CR {
3434
taskActions: string[];
3535
alert: Alert;
3636
tutorial: Tutorial;
37-
tutorials: Tutorial.Info[];
37+
tutorialList: Tutorial.Info[];
3838
testRun: boolean;
3939
checks: Checks;
4040
}

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@
126126
"src/components/AppMenu/menuRightRouteOptions.tsx",
127127
"src/components/AppMenu/Quit/index.tsx",
128128
"src/components/common/ContentCard.tsx",
129+
"src/components/common/Markdown.tsx",
129130
"src/components/common/RouteButton.tsx",
130131
"src/components/FinalPage/index.tsx",
131-
"src/components/Markdown/index.tsx",
132132
"src/components/Page/EditPage/index.tsx",
133133
"src/components/Page/Hints/HintButton.tsx",
134134
"src/components/Page/Hints/index.tsx",

tsd.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@
3131
},
3232
"react-redux/react-redux.d.ts": {
3333
"commit": "efd40e67ff323f7147651bdbef03c03ead7b1675"
34-
},
35-
"classnames/classnames.d.ts": {
36-
"commit": "e5a27ea95e47b95333784f1f0d590127b4e39a89"
37-
},
38-
"react/react-addons-css-transition-group.d.ts": {
39-
"commit": "5d0f2126c8dac8fce0ff020218aea06607213b0d"
4034
}
4135
}
4236
}

0 commit comments

Comments
 (0)