Basic yarn + browserify + babeljs infrastructure

For webapp
This commit is contained in:
greg 2017-09-20 23:15:29 -07:00
parent 8b83d982c0
commit 67ff21d408
4 changed files with 26 additions and 4 deletions

View File

@ -3,10 +3,12 @@
<head>
</head>
<body>
<div id="main">
</div>
Type your source code into here:
<textarea class="code-input">
</textarea>
<script src="main.js"></script>
<script src="bundle.js"></script>
</body>
</html>

View File

@ -1,3 +0,0 @@
console.log("YOLO");

5
static/main.jsx Normal file
View File

@ -0,0 +1,5 @@
const React = require("react");
const ReactDOM = require("react-dom");
const main = document.getElementById("main");
ReactDOM.render(<h1>Schala web input</h1>, main);

18
static/package.json Normal file
View File

@ -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"]
}
}