Skip to content

Commit 86140e4

Browse files
committed
basic example
1 parent 46a1a01 commit 86140e4

File tree

6 files changed

+2828
-0
lines changed

6 files changed

+2828
-0
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/node_modules
2+
3+
# temporarily as don't need to track changes while I'm fiddling about
4+
# sorry
5+
dice.js
6+
!src/dice.js

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Simple dice game in React
2+
3+
4+
## Install
5+
6+
Use `npm` for JSX processor
7+
8+
```bash
9+
npm init -y
10+
npm install babel-cli@6 babel-preset-react-app@3 # jsx pre-processor
11+
```
12+
13+
and run it
14+
15+
```bash
16+
npx babel --watch src --out-dir . --presets react-app/prod
17+
```

index.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>Dice game</title>
6+
</head>
7+
<body>
8+
9+
<div id="like_button_container"></div>
10+
11+
<!-- Note: when deploying, replace "development.js" with "production.min.js". -->
12+
<script src="https://unpkg.com/react@16/umd/react.development.js" crossorigin></script>
13+
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js" crossorigin></script>
14+
15+
<!-- Load our React component. -->
16+
<script src="dice.js"></script>
17+
18+
</body>

0 commit comments

Comments
 (0)