From 50efd8f59b814bc27e870ff3b09372b0d717b926 Mon Sep 17 00:00:00 2001 From: Anike Arni Date: Wed, 1 Feb 2017 16:41:11 -0200 Subject: [#922] Add react with @tayanefernandes --- web-ui/app/account_recovery.html | 5 +++-- web-ui/app/js/account_recovery.js | 7 +++++++ web-ui/package.json | 3 +++ web-ui/webpack.config.js | 4 ++-- 4 files changed, 15 insertions(+), 4 deletions(-) (limited to 'web-ui') diff --git a/web-ui/app/account_recovery.html b/web-ui/app/account_recovery.html index 448f5ea8..407f5907 100644 --- a/web-ui/app/account_recovery.html +++ b/web-ui/app/account_recovery.html @@ -1,9 +1,10 @@ - $account_email - Pixelated Account Recovery + Pixelated Account Recovery - Hello!!! :) +
+ diff --git a/web-ui/app/js/account_recovery.js b/web-ui/app/js/account_recovery.js index e69de29b..a136b261 100644 --- a/web-ui/app/js/account_recovery.js +++ b/web-ui/app/js/account_recovery.js @@ -0,0 +1,7 @@ +import React from 'react' +import { render } from 'react-dom' + +render( +

Hello, world!

, + document.getElementById('root') +); diff --git a/web-ui/package.json b/web-ui/package.json index 480dcc55..a41396f7 100644 --- a/web-ui/package.json +++ b/web-ui/package.json @@ -9,6 +9,7 @@ "babel-core": "^6.21.0", "babel-loader": "^6.2.10", "babel-preset-es2015": "^6.18.0", + "babel-preset-react": "^6.22.0", "bower": "1.7.9", "copy-webpack-plugin": "^4.0.1", "dompurify": "^0.8.4", @@ -39,6 +40,8 @@ "minify": "^2.0.13", "modernizr": "^3.3.1", "quoted-printable": "^1.0.1", + "react": "^15.4.2", + "react-dom": "^15.4.2", "requirejs": "2.2.0", "typeahead.js": "^0.11.1", "utf8": "^2.1.2", diff --git a/web-ui/webpack.config.js b/web-ui/webpack.config.js index 720a9a2e..f0f605b0 100644 --- a/web-ui/webpack.config.js +++ b/web-ui/webpack.config.js @@ -6,7 +6,7 @@ var aliases = require('./config/alias-webpack'); module.exports = { entry: { app: './app/js/index.js', - recovery: './app/js/account_recovery.js', + account_recovery: './app/js/account_recovery.js', sandbox: './app/js/sandbox.js' }, node: { fs: 'empty' }, @@ -25,7 +25,7 @@ module.exports = { test: /\.js$/, exclude: /(node_modules|bower_components)/, loader: 'babel', - query: { presets: ['es2015']} + query: { presets: ['es2015', 'react']} } ] }, -- cgit v1.2.3