Skip to content

Commit

Permalink
Fix comments and refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
kohei-takata committed Nov 14, 2015
1 parent 70efea8 commit 14e5a4c
Show file tree
Hide file tree
Showing 18 changed files with 40 additions and 37 deletions.
2 changes: 1 addition & 1 deletion exercises/components/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ exercise.addProcessor(function (mode, callback) {
});
});

// delayed for 5000ms to wait for servers to start so we can start
// delayed for 3000ms to wait for servers to start so we can start
// playing with them
function query(mode) {
var exercise = this;
Expand Down
2 changes: 1 addition & 1 deletion exercises/css/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ exercise.addProcessor(function (mode, callback) {
});
});

// delayed for 5000ms to wait for servers to start so we can start
// delayed for 3000ms to wait for servers to start so we can start
// playing with them
function query(mode) {
var exercise = this;
Expand Down
11 changes: 6 additions & 5 deletions exercises/css/solution/solution.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ var app = express();
app.set('port', (process.argv[2] || 3000));
app.set('view engine', 'jsx');
app.set('views', __dirname + '/views');
app.engine('jsx', require('express-react-views').createEngine({ transformViews: false }));
app.engine('jsx', require('express-react-views').createEngine({transformViews: false}));

require('babel/register')({
ignore: false
ignore: false
});

app.use('/', function(req, res) {
res.render('index', '');
app.use('/', function (req, res) {
res.render('index', '');
});

app.listen(app.get('port'), function() {});
app.listen(app.get('port'), function () {
});
2 changes: 1 addition & 1 deletion exercises/css2/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ exercise.addProcessor(function (mode, callback) {
});
});

// delayed for 5000ms to wait for servers to start so we can start
// delayed for 3000ms to wait for servers to start so we can start
// playing with them
function query(mode) {
var exercise = this
Expand Down
1 change: 1 addition & 0 deletions exercises/css2/solution/solution.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ app.engine('jsx', require('express-react-views').createEngine());
require('babel/register')({
ignore: false
});

var TodoBox = require('./views/index.jsx');

var data = [
Expand Down
2 changes: 1 addition & 1 deletion exercises/event/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ exercise.addProcessor(function (mode, callback) {
});
});

// delayed for 5000ms to wait for servers to start so we can start
// delayed for 3000ms to wait for servers to start so we can start
// playing with them
function query(mode) {
var exercise = this
Expand Down
2 changes: 1 addition & 1 deletion exercises/hello_react/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ exercise.addProcessor(function (mode, callback) {
});
});

// delayed for 5000ms to wait for servers to start so we can start
// delayed for 3000ms to wait for servers to start so we can start
// playing with them
function query(mode) {
var exercise = this;
Expand Down
2 changes: 0 additions & 2 deletions exercises/hello_react/problem.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

`$ npm install react react-dom express body-parser express-react-views@0.9.0 babel@5.8.23`

`@5.8.23`

`node_modules` というフォルダが作成されたかと思います。その中にモジュールのフォルダがあります。

次に `program.js` を作成します。
Expand Down
2 changes: 1 addition & 1 deletion exercises/isomorphic/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ exercise.addProcessor(function (mode, callback) {
});
});

// delayed for 5000ms to wait for servers to start so we can start
// delayed for 3000ms to wait for servers to start so we can start
// playing with them
function query(mode) {
var exercise = this
Expand Down
4 changes: 2 additions & 2 deletions exercises/isomorphic/solution/solution.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ var data = [
app.use('/bundle.js', function (req, res) {
res.setHeader('content-type', 'application/javascript');

browserify({ debug: true })
browserify({debug: true})
.transform(babelify.configure({
presets: ["react", "es2015"]
}))
.require("./app.js", { entry: true })
.require("./app.js", {entry: true})
.bundle()
.pipe(res);
});
Expand Down
2 changes: 1 addition & 1 deletion exercises/prop_and_state/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ exercise.addProcessor(function (mode, callback) {
});
});

// delayed for 5000ms to wait for servers to start so we can start
// delayed for 3000ms to wait for servers to start so we can start
// playing with them
function query(mode) {
var exercise = this
Expand Down
2 changes: 1 addition & 1 deletion exercises/props/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ exercise.addProcessor(function (mode, callback) {
});
});

// delayed for 5000ms to wait for servers to start so we can start
// delayed for 3000ms to wait for servers to start so we can start
// playing with them
function query(mode) {
var exercise = this;
Expand Down
2 changes: 1 addition & 1 deletion exercises/props_from_server/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ exercise.addProcessor(function (mode, callback) {
});
});

// delayed for 5000ms to wait for servers to start so we can start
// delayed for 3000ms to wait for servers to start so we can start
// playing with them
function query(mode) {
var exercise = this;
Expand Down
15 changes: 8 additions & 7 deletions exercises/props_from_server/solution/solution.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ var app = express();
app.set('port', (process.argv[2] || 3000));
app.set('view engine', 'jsx');
app.set('views', __dirname + '/views');
app.engine('jsx', require('express-react-views').createEngine({ transformViews: false }));
app.engine('jsx', require('express-react-views').createEngine({transformViews: false}));

require('babel/register')({
ignore: false
ignore: false
});

var data = [
{ title: 'Shopping', detail: process.argv[3] },
{ title: 'Hair cut', detail: process.argv[4] }
{title: 'Shopping', detail: process.argv[3]},
{title: 'Hair cut', detail: process.argv[4]}
];

app.use('/', function(req, res) {
res.render('index', {data: data});
app.use('/', function (req, res) {
res.render('index', {data: data});
});

app.listen(app.get('port'), function() {});
app.listen(app.get('port'), function () {
});
2 changes: 1 addition & 1 deletion exercises/proptypes/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ exercise.addProcessor(function (mode, callback) {
});
});

// delayed for 5000ms to wait for servers to start so we can start
// delayed for 3000ms to wait for servers to start so we can start
// playing with them
function query(mode) {
var exercise = this;
Expand Down
11 changes: 6 additions & 5 deletions exercises/proptypes/solution/solution.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ var app = express();
app.set('port', (process.argv[2] || 3000));
app.set('view engine', 'jsx');
app.set('views', __dirname + '/views');
app.engine('jsx', require('express-react-views').createEngine({ transformViews: false }));
app.engine('jsx', require('express-react-views').createEngine({transformViews: false}));

require('babel/register')({
ignore: false
ignore: false
});

app.use('/', function(req, res) {
res.render('index', '');
app.use('/', function (req, res) {
res.render('index', '');
});

app.listen(app.get('port'), function() {});
app.listen(app.get('port'), function () {
});
2 changes: 1 addition & 1 deletion exercises/state/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ exercise.addProcessor(function (mode, callback) {
});
});

// delayed for 5000ms to wait for servers to start so we can start
// delayed for 3000ms to wait for servers to start so we can start
// playing with them
function query(mode) {
var exercise = this;
Expand Down
11 changes: 6 additions & 5 deletions exercises/state/solution/solution.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ var app = express();
app.set('port', (process.argv[2] || 3000));
app.set('view engine', 'jsx');
app.set('views', __dirname + '/views');
app.engine('jsx', require('express-react-views').createEngine({ transformViews: false }));
app.engine('jsx', require('express-react-views').createEngine({transformViews: false}));

require('babel/register')({
ignore: false
ignore: false
});

app.use('/', function(req, res) {
res.render('index', '');
app.use('/', function (req, res) {
res.render('index', '');
});

app.listen(app.get('port'), function() {});
app.listen(app.get('port'), function () {
});

0 comments on commit 14e5a4c

Please sign in to comment.