Added react workflow
This commit is contained in:
parent
b5bdd42ae0
commit
c8a5e36443
5 changed files with 24 additions and 6 deletions
|
@ -12,3 +12,6 @@ uglifyjs build/js/app.js --compress --screw-ie8 --define --stats --keep-fnames -
|
|||
|
||||
echo ">> Building Main JS..."
|
||||
uglifyjs src/main.js --compress --screw-ie8 --define --stats --keep-fnames -o build/main.js
|
||||
|
||||
echo ">> Building Audio Controller..."
|
||||
uglifyjs src/js/audio.js --compress --screw-ie8 --define --stats --keep-fnames -o build/js/audio.js
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
<title>Hello World!</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello World!</h1>
|
||||
We are using node <script>document.write(process.versions.node)</script>,
|
||||
Chrome <script>document.write(process.versions.chrome)</script>,
|
||||
and Electron <script>document.write(process.versions.electron)</script>.
|
||||
<script src="page.js"></script>
|
||||
<div id="AppContainer"></div>
|
||||
|
||||
<script src="js/app.js"></script>
|
||||
<script src="js/audio.js"></script>
|
||||
<script src="lib/bootstrap.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
app.js
|
||||
var React = require('react');
|
||||
var Home = require('./components/home');
|
||||
|
||||
|
||||
React.render(<Home />, document.getElementById('AppContainer'));
|
0
src/js/audio.js
Normal file
0
src/js/audio.js
Normal file
11
src/js/components/home.js
Normal file
11
src/js/components/home.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
var React = require('react');
|
||||
|
||||
var Home = React.createClass({
|
||||
render: function () {
|
||||
return (
|
||||
<h1>Keyboard Mechanizer</h1>
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = Home;
|
Reference in a new issue