From 896b2f5d16fcf3515a605d25ec56fa56b838e68d Mon Sep 17 00:00:00 2001 From: Gianluca Esposito Date: Sat, 12 Sep 2015 10:09:20 +0200 Subject: [PATCH] Converted to ES6, JSX --- app.coffee | 9 --------- app.js | 11 +++++++++++ html.cjsx | 29 ----------------------------- html.jsx | 38 ++++++++++++++++++++++++++++++++++++++ pages/_template.cjsx | 23 ----------------------- pages/_template.jsx | 27 +++++++++++++++++++++++++++ 6 files changed, 76 insertions(+), 61 deletions(-) delete mode 100644 app.coffee create mode 100644 app.js delete mode 100644 html.cjsx create mode 100644 html.jsx delete mode 100644 pages/_template.cjsx create mode 100644 pages/_template.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 3efb6c6f582af..0000000000000 --- a/html.cjsx +++ /dev/null @@ -1,29 +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 - - - - - - - {title} - - - - -
-