mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
Add some code
This commit is contained in:
parent
15c802b7c0
commit
49eaca1e9f
16
index.html
Normal file
16
index.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
|
<title>ascribe</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!--[if lt IE 8]>
|
||||||
|
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
|
||||||
|
<![endif]-->
|
||||||
|
<div id="main"></div>
|
||||||
|
</body>
|
||||||
|
<script src="build/app.js"></script>
|
||||||
|
</html>
|
10
js/app.jsx
Normal file
10
js/app.jsx
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
import HelloApp from './components/hello_app';
|
||||||
|
|
||||||
|
React.render(
|
||||||
|
<HelloApp />,
|
||||||
|
document.getElementById('alt-todo')
|
||||||
|
);
|
||||||
|
|
1
js/bundle.js
Normal file
1
js/bundle.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
console.error("\n/home/alberto/ascribe/repos/onion/js/app.jsx:3\nimport React from 'react';\n^\nParseError: 'import' and 'export' may appear only with 'sourceType: module'");
|
11
js/components/hello_app.jsx
Normal file
11
js/components/hello_app.jsx
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
class TodoApp extends React.Component {
|
||||||
|
render () {
|
||||||
|
return (
|
||||||
|
<h1>ascribe all the things!</h1>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default HelloreactApp;
|
12
package.json
12
package.json
@ -8,11 +8,17 @@
|
|||||||
"react": "^0.12.2"
|
"react": "^0.12.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"browserify": "^8.0.3",
|
"browserify": "^6.2.0",
|
||||||
"reactify": "^0.17.1"
|
"envify": "^3.0.0",
|
||||||
|
"jest-cli": "^0.4.3",
|
||||||
|
"reactify": "^0.15.2",
|
||||||
|
"uglify-js": "~2.4.15",
|
||||||
|
"watchify": "^2.1.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "browserify -t [reactify --es6] src/app.jsx > build/app.js"
|
"start": "watchify -o js/bundle.js -v -d js/app.jsx",
|
||||||
|
"build": "browserify -t [reactify --es6] src/app.jsx > build/app.js",
|
||||||
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"author": "Alberto Granzotto <alberto@ascribe.io>"
|
"author": "Alberto Granzotto <alberto@ascribe.io>"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user