Skip to content

Commit 6aee523

Browse files
authored
Add a way to generate demo page (#17)
Add a `build-demo` script which will build the demo page to the `demo-build/` directory. This directory can then be copied to a `gh-pages` branch so that we can publish the demo page to GitHub Pages. Also, considering that we also need an HTML file to build the demo page, move that along with the JavaScript file to the `demo/` directory.
1 parent d6f0739 commit 6aee523

File tree

6 files changed

+2016
-6
lines changed

6 files changed

+2016
-6
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*.tgz
2+
demo-build/
23
node_modules/

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ for(var i = 0; i < 60; i++) {
2727
}
2828
```
2929

30-
## Example
30+
## Demo
3131

32-
You can run an example by installing beefy (`npm i -g beefy`) and then running `npm run sample`.
32+
You can run a demo by running `npm run build-demo`, then opening `demo-build/index.html` in your browser.

demo/index.html

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Jazzicon Demo</title>
6+
</head>
7+
<body>
8+
<script src="main.js"></script>
9+
</body>
10+
</html>

sample.js demo/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var jazzicon = require('./')
1+
var jazzicon = require('../')
22

33
var body = document.querySelector('body')
44
for(var i = 0; i < 600; i++) {

0 commit comments

Comments
 (0)