Skip to content

Commit b62b742

Browse files
committed
remove deps: core-coderoad, redux-throttle-actions
1 parent 30521ab commit b62b742

File tree

12 files changed

+39
-58
lines changed

12 files changed

+39
-58
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [0.12.2] - WIP
6+
- drop "core-coderoad" dependency.
7+
58
## [0.12.1] - 2016-08-18
69
- remove devDependencies, as Atom installs them and slows the install time significantly
710
- create folders if they do not already exist when writing files

lib/modules/alert/reducer.js

Whitespace-only changes.

lib/modules/hints/index.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
"use strict";
2-
var Hints_1 = require('./Hints');
3-
exports.Hints = Hints_1.default;
4-
var reducer_1 = require('./reducer');
5-
exports.reducer = reducer_1.default;
2+
var types_1 = require('./types');
3+
function hintPositionReducer(hintPosition, action) {
4+
if (hintPosition === void 0) { hintPosition = 0; }
5+
switch (action.type) {
6+
case types_1.HINT_POSITION_SET:
7+
return action.payload.hintPosition;
8+
default:
9+
return hintPosition;
10+
}
11+
}
12+
Object.defineProperty(exports, "__esModule", { value: true });
13+
exports.default = hintPositionReducer;

lib/modules/hints/reducer.js

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

lib/options/configureStore.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
"use strict";
22
var redux_1 = require('redux');
33
var createLogger = require('redux-logger');
4-
var redux_throttle_actions_1 = require('redux-throttle-actions');
54
var redux_thunk_1 = require('redux-thunk');
65
var configureStore = function (_a) {
7-
var reducer = _a.reducer, devMode = _a.devMode, throttle = _a.throttle;
6+
var reducer = _a.reducer, devMode = _a.devMode;
87
var middlewares = [redux_thunk_1.default];
98
if (devMode) {
109
var logger = createLogger();
@@ -13,12 +12,6 @@ var configureStore = function (_a) {
1312
else {
1413
process.env.NODE_ENV = 'production';
1514
}
16-
if (throttle) {
17-
var toThrottle = Object.keys(throttle);
18-
toThrottle.forEach(function (action) {
19-
middlewares.push(redux_throttle_actions_1.default([].concat(action), throttle[action]));
20-
});
21-
}
2215
var store = redux_1.createStore(reducer, redux_1.applyMiddleware.apply(void 0, middlewares));
2316
return store;
2417
};

lib/reducers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var tutorials_1 = require('./modules/tutorials');
1414
var window_1 = require('./modules/window');
1515
Object.defineProperty(exports, "__esModule", { value: true });
1616
exports.default = redux_1.combineReducers({
17-
alert: alert_1.default, checks: setup_1.checks, editor: editor_1.reducer, dir: dir_1.default, hintPosition: hints_1.reducer,
17+
alert: alert_1.default, checks: setup_1.checks, editor: editor_1.reducer, dir: dir_1.default, hintPosition: hints_1.default,
1818
packageJson: setup_1.packageJson, pagePosition: page_1.pagePosition, progress: progress_1.reducer, route: route_1.reducer,
1919
tutorial: tutorial_1.reducer, tutorials: tutorials_1.reducer,
2020
taskActions: page_1.taskActions, taskPosition: tests_1.taskPosition, taskTests: page_1.taskTests, testRun: tests_1.testRun, window: window_1.reducer

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,18 @@
3131
"dependencies": {
3232
"atom-plugin-command-line": "1.0.2",
3333
"coderoad-cli": "0.9.0",
34-
"core-coderoad": "^0.8.1",
34+
"marked": "0.3.6",
3535
"material-ui": "0.15.4",
3636
"node-file-exists": "1.1.0",
3737
"react": "15.3.1",
3838
"react-dom": "15.3.1",
3939
"react-redux": "4.4.5",
4040
"react-router-sans-urls": "0.1.2",
4141
"react-tap-event-plugin": "1.0.0",
42-
"redux": "3.5.2"
42+
"redux": "3.5.2",
43+
"redux-logger": "2.6.1",
44+
"redux-thunk": "2.1.0",
45+
"reselect": "2.5.3"
4346
},
4447
"engines": {
4548
"atom": ">=1.0.0 <2.0.0"

src/modules/hints/index.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,14 @@
1-
export {default as Hints} from './Hints';
2-
export {default as reducer} from './reducer';
1+
import {HINT_POSITION_SET} from './types';
2+
3+
export default function hintPositionReducer(
4+
hintPosition = 0, action: Action
5+
): number {
6+
switch (action.type) {
7+
8+
case HINT_POSITION_SET:
9+
return action.payload.hintPosition;
10+
11+
default:
12+
return hintPosition;
13+
}
14+
}

src/modules/hints/reducer.ts

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

src/options/configureStore.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { applyMiddleware, createStore } from 'redux';
22
import * as createLogger from 'redux-logger';
3-
import throttleActions from 'redux-throttle-actions';
43
import thunk from 'redux-thunk';
54

6-
const configureStore = ({reducer, devMode, throttle}) => {
5+
const configureStore = ({reducer, devMode}) => {
76

87
const middlewares = [thunk];
98

@@ -15,16 +14,6 @@ const configureStore = ({reducer, devMode, throttle}) => {
1514
process.env.NODE_ENV = 'production';
1615
}
1716

18-
// throttle save
19-
if (throttle) {
20-
const toThrottle = Object.keys(throttle);
21-
toThrottle.forEach((action: string) => {
22-
middlewares.push(
23-
throttleActions([].concat(action), throttle[action])
24-
);
25-
});
26-
}
27-
2817
// create store with middlewares
2918
const store: Redux.Store = createStore(
3019
reducer,

src/reducers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {combineReducers} from 'redux';
44
import {default as alert} from './modules/alert';
55
import {default as dir} from './modules/dir';
66
import {reducer as editor} from './modules/editor';
7-
import {reducer as hintPosition} from './modules/hints';
7+
import {default as hintPosition} from './modules/hints';
88
import {pagePosition, taskActions, taskTests} from './modules/page';
99
import {reducer as progress} from './modules/progress';
1010
import {reducer as route} from './modules/route';

tslint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": ["tslint:latest", "tslint-react"],
2+
"extends": ["tslint", "tslint-react"],
33
"rules": {
44
"jsx-alignment": true,
55
"jsx-no-lambda": true,

0 commit comments

Comments
 (0)