From 67ff21d40844d4999aeb98a11111d972c8fd28d6 Mon Sep 17 00:00:00 2001 From: greg Date: Wed, 20 Sep 2017 23:15:29 -0700 Subject: [PATCH] Basic yarn + browserify + babeljs infrastructure For webapp --- static/index.html | 4 +++- static/main.js | 3 --- static/main.jsx | 5 +++++ static/package.json | 18 ++++++++++++++++++ 4 files changed, 26 insertions(+), 4 deletions(-) delete mode 100644 static/main.js create mode 100644 static/main.jsx create mode 100644 static/package.json diff --git a/static/index.html b/static/index.html index d8a2390..4834a16 100644 --- a/static/index.html +++ b/static/index.html @@ -3,10 +3,12 @@ +
+
Type your source code into here: - + diff --git a/static/main.js b/static/main.js deleted file mode 100644 index d802934..0000000 --- a/static/main.js +++ /dev/null @@ -1,3 +0,0 @@ - - -console.log("YOLO"); diff --git a/static/main.jsx b/static/main.jsx new file mode 100644 index 0000000..8b6bcec --- /dev/null +++ b/static/main.jsx @@ -0,0 +1,5 @@ +const React = require("react"); +const ReactDOM = require("react-dom"); + +const main = document.getElementById("main"); +ReactDOM.render(

Schala web input

, main); diff --git a/static/package.json b/static/package.json new file mode 100644 index 0000000..f8d2e57 --- /dev/null +++ b/static/package.json @@ -0,0 +1,18 @@ +{ + "name": "static", + "version": "1.0.0", + "main": "index.js", + "license": "MIT", + "dependencies": { + "babel": "^6.23.0", + "babel-preset-es2015": "^6.24.1", + "babel-preset-react": "^6.24.1", + "babelify": "^7.3.0", + "browserify": "^14.4.0", + "react": "^15.6.1", + "react-dom": "^15.6.1" + }, + "babel": { + "presets": ["babel-preset-react", "babel-preset-es2015"] + } +}