From f3d6a273fba8122ff2c0e3e7aba20f65527bcd48 Mon Sep 17 00:00:00 2001 From: Andrew Sliwinski Date: Tue, 13 Oct 2015 09:40:40 -0400 Subject: [PATCH 1/4] Resolve merge conflict --- package.json | 5 +++-- src/components/navigation/navigation.jsx | 2 +- src/lib/log.js | 4 ++++ src/log.js | 4 ---- src/mixins/api.jsx | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 src/lib/log.js delete mode 100644 src/log.js diff --git a/package.json b/package.json index 922a257f7..8f39efb0c 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ }, "homepage": "https://github.com/llk/scratch-www#readme", "dependencies": { - "bunyan": "1.5.0", + "bunyan": "1.5.1", "compression": "1.5.2", "express": "4.13.3", "express-http-proxy": "0.6.0", @@ -40,7 +40,8 @@ "file-loader": "0.8.4", "json-loader": "0.5.2", "jsx-loader": "0.13.2", - "node-sass": "3.3.2", + "minilog": "2.0.8", + "node-sass": "3.3.3", "react": "0.13.3", "react-modal": "0.3.0", "react-onclickoutside": "0.3.1", diff --git a/src/components/navigation/navigation.jsx b/src/components/navigation/navigation.jsx index 40adb528b..8d3999ed7 100644 --- a/src/components/navigation/navigation.jsx +++ b/src/components/navigation/navigation.jsx @@ -2,7 +2,7 @@ var React = require('react'); var classNames = require('classnames'); var xhr = require('xhr'); -var log = require('../../log.js'); +var log = require('../../lib/log.js'); var Api = require('../../mixins/api.jsx'); var Session = require('../../mixins/session.jsx'); diff --git a/src/lib/log.js b/src/lib/log.js new file mode 100644 index 000000000..9a364044f --- /dev/null +++ b/src/lib/log.js @@ -0,0 +1,4 @@ +var minilog = require('minilog'); +minilog.enable(); + +module.exports = minilog('www'); diff --git a/src/log.js b/src/log.js deleted file mode 100644 index 2706c61af..000000000 --- a/src/log.js +++ /dev/null @@ -1,4 +0,0 @@ -var bunyan = require('bunyan'); - -var Logger = bunyan.createLogger({name: 'scratch-www'}); -module.exports = Logger; diff --git a/src/mixins/api.jsx b/src/mixins/api.jsx index 60eb36b02..a5873e450 100644 --- a/src/mixins/api.jsx +++ b/src/mixins/api.jsx @@ -1,7 +1,7 @@ var cookie = require('cookie'); var defaults = require('lodash.defaults'); var xhr = require('xhr'); -var log = require('../log.js'); +var log = require('../lib/log.js'); var Api = { getCsrf: function (callback) { From add7d319d85346d570212083a0fac13b9b87d68b Mon Sep 17 00:00:00 2001 From: Andrew Sliwinski Date: Tue, 13 Oct 2015 09:41:40 -0400 Subject: [PATCH 2/4] Fix title rendering --- server/defaults.json | 2 +- server/template.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/defaults.json b/server/defaults.json index c94cc1e24..259a423a8 100644 --- a/server/defaults.json +++ b/server/defaults.json @@ -1,4 +1,4 @@ { - "title": "Scratch - Imagine, Program, Share", + "title": "Imagine, Program, Share", "description": "Scratch is a free programming language and online community where you can create your own interactive stories, games, and animations." } diff --git a/server/template.html b/server/template.html index cff451509..c03f7da7b 100644 --- a/server/template.html +++ b/server/template.html @@ -15,7 +15,7 @@ - + From 35ae981c193724e6cea215e7d189df109ef89dbe Mon Sep 17 00:00:00 2001 From: Andrew Sliwinski Date: Tue, 13 Oct 2015 09:42:39 -0400 Subject: [PATCH 3/4] Remove old session.json mockup --- src/session.json | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 src/session.json diff --git a/src/session.json b/src/session.json deleted file mode 100644 index 534e16d86..000000000 --- a/src/session.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "token": "62d43b28d86a14423e01bdb2995dbbb2", - "user": { - "id": 1709047, - "username": "thisandagain", - "thumbnailUrl": "//cdn2.scratch.mit.edu/get_image/user/1709047_32x32.png?v=1427980331.0" - }, - "permissions": { - "admin": true, - "social": true, - "educator": false - }, - "flags": { - "has_outstanding_email_confirmation": false, - "show_welcome": false - } -} From 7670f61cec0157ababaad7f6e3e572dfc8f5c7c6 Mon Sep 17 00:00:00 2001 From: Andrew Sliwinski Date: Tue, 13 Oct 2015 15:40:51 -0400 Subject: [PATCH 4/4] Minor clean-up of environment var name in webpack config --- webpack.config.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index c9110402b..beaeebe5c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,7 +1,8 @@ var path = require('path'); var webpack = require('webpack'); + +var environment = require('./src/environment.js'); var routes = require('./server/routes.json'); -var buildEnv = require('./src/environment.js'); // Prepare all entry points var entry = { @@ -53,7 +54,7 @@ module.exports = { }, plugins: [ new webpack.DefinePlugin({ - 'process.env': buildEnv + 'process.env': environment }), new webpack.optimize.UglifyJsPlugin({ compress: {