Skip to content

Commit 0d0d561

Browse files
committed
fix breaking changes
1 parent 9f18f53 commit 0d0d561

File tree

7 files changed

+18
-12
lines changed

7 files changed

+18
-12
lines changed

lib/components/Page/PageDescription/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
1616
var React = require('react');
1717
var react_redux_1 = require('react-redux');
1818
var actions_1 = require('../../../actions');
19+
var selectors_1 = require('../../../selectors');
1920
var index_1 = require('../../index');
2021
var Card_1 = require('material-ui/Card');
2122
var styles = {
@@ -42,7 +43,7 @@ var PageDescription = (function (_super) {
4243
};
4344
PageDescription = __decorate([
4445
react_redux_1.connect(function (state) { return ({
45-
page: actions_1.pageSelector(state),
46+
page: selectors_1.pageSelector(state),
4647
}); }, { editorMarkdownOpen: actions_1.editorMarkdownOpen }),
4748
__metadata('design:paramtypes', [])
4849
], PageDescription);

lib/components/Publish/PublishStep.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22
var React = require('react');
3-
var index_1 = require('../../index');
3+
var index_1 = require('../index');
44
var Stepper_1 = require('material-ui/Stepper');
55
var colors_1 = require('material-ui/styles/colors');
66
var error_1 = require('material-ui/svg-icons/alert/error');

lib/modules/tutorial/reducer.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@ function tutorial(t, action) {
1717
if (t === void 0) { t = _tutorial; }
1818
switch (action.type) {
1919
case types_1.TUTORIAL_INIT:
20-
var _a = action.payload, dir = _a.dir, name_1 = _a.name;
21-
coderoad_cli_1.create(dir, name_1);
20+
coderoad_cli_1.create(action.payload);
2221
if (t.info.title.length < 1) {
23-
var info = Object.assign({}, t.info, { title: name_1 });
22+
var info = Object.assign({}, t.info, { title: name });
2423
t = Object.assign({}, t, { info: info });
2524
}
2625
return t;
2726
case types_1.TUTORIAL_BUILD:
28-
coderoad_cli_1.build(action.payload.dir, path_1.join('tutorial', 'tutorial.md'));
27+
coderoad_cli_1.build({
28+
dir: action.payload.dir,
29+
filePath: path_1.join('tutorial', 'tutorial.md'),
30+
});
2931
return t;
3032
case types_1.TUTORIAL_LOAD:
3133
var loadedCj = readFile_1.default(action.payload.dir, 'coderoad.json');

src/components/Page/PageDescription/index.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import * as React from 'react';
22
import {connect} from 'react-redux';
33

4-
import {editorMarkdownOpen, pageSelector} from '../../../actions';
4+
import {editorMarkdownOpen} from '../../../actions';
5+
import {pageSelector} from '../../../selectors';
56
import {Markdown} from '../../index';
67
import {Card, CardHeader, CardText} from 'material-ui/Card';
78

src/components/Publish/publishStep.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import {CodeBlock} from '../../index';
3+
import {CodeBlock} from '../index';
44
import {Step, StepButton, StepContent} from 'material-ui/Stepper';
55
import {amber500, pink500} from 'material-ui/styles/colors';
66
import ErrorIcon from 'material-ui/svg-icons/alert/error';

src/modules/tutorial/actions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
} from './types';
66

77
export function tutorialInit() {
8-
return function(dispatch, getState) {
8+
return (dispatch, getState) => {
99
const {dir, packageJson} = getState();
1010
dispatch({ type: TUTORIAL_INIT, payload: { dir, name: packageJson.name } });
1111
dispatch(tutorialBuild());

src/modules/tutorial/reducer.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ export default function tutorial(t = _tutorial, action: Action): Tutorial.Output
2424
switch (action.type) {
2525

2626
case TUTORIAL_INIT:
27-
const {dir, name} = action.payload;
28-
create(dir, name);
27+
create(action.payload);
2928
if (t.info.title.length < 1) {
3029
// no title? save packageJson name as title
3130
const info = Object.assign({}, t.info, { title: name });
@@ -35,7 +34,10 @@ export default function tutorial(t = _tutorial, action: Action): Tutorial.Output
3534

3635
case TUTORIAL_BUILD:
3736
// run CLI build to create a new coderoad.json file
38-
build(action.payload.dir, join('tutorial', 'tutorial.md'));
37+
build({
38+
dir: action.payload.dir,
39+
filePath: join('tutorial', 'tutorial.md'),
40+
});
3941
return t;
4042

4143
case TUTORIAL_LOAD:

0 commit comments

Comments
 (0)