From 82fa9f21a2fb8e8319840f0aac491b4ddc5778cd Mon Sep 17 00:00:00 2001 From: Gianluca Esposito Date: Thu, 10 Sep 2015 20:13:26 +0200 Subject: [PATCH 01/10] Started moving to ES6, JSX --- app.coffee | 9 ------- app.js | 11 +++++++++ html.cjsx | 49 ------------------------------------- html.jsx | 61 ++++++++++++++++++++++++++++++++++++++++++++++ wrappers/html.cjsx | 11 --------- wrappers/html.jsx | 16 ++++++++++++ 6 files changed, 88 insertions(+), 69 deletions(-) delete mode 100644 app.coffee create mode 100644 app.js delete mode 100644 html.cjsx create mode 100644 html.jsx delete mode 100644 wrappers/html.cjsx create mode 100644 wrappers/html.jsx diff --git a/app.coffee b/app.coffee deleted file mode 100644 index f6f4d6780158d..0000000000000 --- a/app.coffee +++ /dev/null @@ -1,9 +0,0 @@ -exports.loadContext = (callback) -> - context = require.context './pages', true - if module.hot - module.hot.accept(context.id, -> - context = require.context './pages', true - callback context - ) - - callback context diff --git a/app.js b/app.js new file mode 100644 index 0000000000000..148e5fd58a30a --- /dev/null +++ b/app.js @@ -0,0 +1,11 @@ +exports.loadContext = function(callback) { + var context; + context = require.context('./pages', true); + if (module.hot) { + module.hot.accept(context.id, function() { + context = require.context('./pages', true); + return callback(context); + }); + } + return callback(context); +}; diff --git a/html.cjsx b/html.cjsx deleted file mode 100644 index ef158c14f496b..0000000000000 --- a/html.cjsx +++ /dev/null @@ -1,49 +0,0 @@ -React = require 'react' -Typography = require 'typography' -DocumentTitle = require 'react-document-title' - -typography = new Typography() -{TypographyStyle} = typography - -module.exports = React.createClass - getDefaultProps: -> - body: "" - - render: -> - title = DocumentTitle.rewind() - if @props.title then title = @props.title - - if __GH_PAGES__? and __GH_PAGES__ - urlPrefix = @props.config.ghPagesURLPrefix - else - urlPrefix = "" - - - - - - - {@props.title} - - -