Skip to content

Commit 132814c

Browse files
committed
revert to earlier working version
1 parent e3d0a4c commit 132814c

File tree

10 files changed

+26
-36
lines changed

10 files changed

+26
-36
lines changed

lib/components/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ var default_1 = (function (_super) {
2929
}
3030
default_1.prototype.render = function () {
3131
var state = this.props.state;
32+
console.log(state);
3233
return (React.createElement("section", {className: 'cr', key: 'main', style: { height: height }}, React.createElement(_components_1.Menu, {route: state.route, position: state.position}), React.createElement(_components_1.Routes, {state: state, ref: 'route'}), React.createElement(_components_1.Alert, {alert: state.alert})));
3334
};
3435
default_1 = __decorate([

lib/services/setup/setup.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
"use strict";
2-
var system_checks_1 = require('./system-checks');
32
var setup_checks_1 = require('./setup-checks');
43
var _base_1 = require('../../_base');
54
var Action = require('../../actions/actions');
65
function verifySetupComplete() {
7-
system_checks_1.npmVersionThreeOrLater()
8-
.then(setup_checks_1.hasDirectory)
6+
setup_checks_1.hasDirectory()
97
.then(setup_checks_1.hasPackageJson)
108
.then(setup_checks_1.hasTutorialDep)
119
.then(function () {

lib/services/setup/system-checks.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,8 @@
11
"use strict";
2-
var command_line_1 = require('../command-line');
32
function npmVersionThreeOrLater() {
43
var minVersion = 3;
54
return new Promise(function (resolve, reject) {
6-
var threeOrLater = command_line_1.default('npm', '-v').then(function (res) { return parseInt(res, 10) >= minVersion; });
7-
if (!threeOrLater) {
8-
reject({
9-
key: 'updateNpm',
10-
title: 'Please update to NPM version 3+',
11-
click: null,
12-
text: 'Open a terminal and run:\n `npm install npm -g`',
13-
button: 'Update NPM',
14-
verify: 'NPM updated to version 3 or later'
15-
});
16-
}
17-
else {
18-
resolve();
19-
}
5+
resolve();
206
});
217
}
228
exports.npmVersionThreeOrLater = npmVersionThreeOrLater;

lib/services/setup/tutorials.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ function _isTutorial(name) {
3737
console.log("Error with " + name + ": no test runner specified. " + tutorialError);
3838
return false;
3939
}
40-
var pathToTestRunner = path.join(window.coderoad.dir, 'node_modules', packageJson.config.testRunner);
4140
return true;
4241
}
4342
function searchForTutorials(deps) {

lib/services/setup/update-tutorial.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"use strict";
2+
function canUpdateTutorial(name, currentVersion) {
3+
}
4+
exports.canUpdateTutorial = canUpdateTutorial;

src/components/app.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ window.onresize = function() {
1616
export default class extends React.Component<{state?: CR.State}, {}> {
1717
render(): React.ReactElement<{}> {
1818
const state = this.props.state;
19+
console.log(state);
1920
return (
2021
<section className='cr' key='main' style={{height}}>
2122
<Menu route={state.route} position={state.position} />

src/services/setup/setup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import * as Action from '../../actions/actions';
99

1010
export function verifySetupComplete() {
1111
// system checks
12-
npmVersionThreeOrLater()
12+
// npmVersionThreeOrLater()
1313
// setup checks
14-
.then(hasDirectory)
14+
hasDirectory()
1515
.then(hasPackageJson)
1616
.then(hasTutorialDep)
1717
.then(() => {

src/services/setup/system-checks.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ import commandLine from '../command-line';
33
export function npmVersionThreeOrLater(): Promise<CR.SetupWarning> {
44
const minVersion = 3;
55
return new Promise((resolve, reject) => {
6-
let threeOrLater: Promise<boolean> = commandLine('npm', '-v').then((res: string) => parseInt(res, 10) >= minVersion);
7-
if (!threeOrLater) {
8-
reject({
9-
key: 'updateNpm',
10-
title: 'Please update to NPM version 3+',
11-
text: 'Open a terminal and run:\n `npm install npm -g`',
12-
verify: 'NPM updated to version 3 or later'
13-
});
14-
} else {
15-
resolve();
16-
}
6+
resolve();
7+
// let threeOrLater: Promise<boolean> = commandLine('npm', '-v').then((res: string) => parseInt(res, 10) >= minVersion);
8+
// if (!threeOrLater) {
9+
// reject({
10+
// key: 'updateNpm',
11+
// title: 'Please update to NPM version 3+',
12+
// text: 'Open a terminal and run:\n `npm install npm -g`',
13+
// verify: 'NPM updated to version 3 or later'
14+
// });
15+
// } else {
16+
// resolve();
17+
// }
1718
});
1819
}

src/services/setup/tutorials.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ function _isTutorial(name: string): boolean {
4343
return false;
4444
}
4545

46-
let currentTutorialVersion: string = packageJson.dependencies[name] || packageJson.devDependencies[name];
47-
canUpdateTutorial(name, currentTutorialVersion);
46+
// let currentTutorialVersion: string = packageJson.dependencies[name] || packageJson.devDependencies[name];
47+
// canUpdateTutorial(name, currentTutorialVersion);
4848

4949
// let pathToTestRunner = path.join(window.coderoad.dir, 'node_modules', packageJson.config.testRunner);
5050
// // if (!fileExists(pathToTestRunner)) {

src/services/setup/update-tutorial.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import commandLine from '../command-line';
22

33
export function canUpdateTutorial(name: string, currentVersion: string) {
4-
let latestVersion = commandLine('npm', `outdated ${name}`);
5-
console.log(latestVersion, currentVersion);
4+
// let latestVersion = commandLine('npm', `outdated ${name}`);
5+
// console.log(latestVersion, currentVersion);
66
}

0 commit comments

Comments
 (0)