Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.

Commit c772198

Browse files
authored
Improve watch-demo script and simplify deploy-demo (#179)
* simplify make-website.sh and add publish-website.sh * update * improve watch-demo script and simplify deploy-demo * reformat * fix * simplify even more
1 parent cdc4bd6 commit c772198

File tree

22 files changed

+58
-57
lines changed

22 files changed

+58
-57
lines changed

.vscode/settings.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,9 @@
1313
"files.trimTrailingWhitespace": true,
1414
"editor.tabSize": 2,
1515
"editor.insertSpaces": true,
16-
"[json]": {
17-
"editor.formatOnSave": false
16+
"[typescript]": {
17+
"editor.formatOnSave": true
1818
},
19-
"[html]": {
20-
"editor.formatOnSave": false
21-
},
22-
"editor.formatOnSave": true,
2319
"clang-format.style": "Google",
2420
"files.insertFinalNewline": true,
2521
"editor.detectIndentation": false,

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,15 @@ well as the [Clang-Format VSCode extension](https://marketplace.visualstudio.com
8181
To interactively develop any of the demos (e.g. `demos/nn-art/`):
8282

8383
```bash
84-
$ ./scripts/watch-demo demos/nn-art/nn-art.ts
84+
$ ./scripts/watch-demo demos/nn-art
8585
>> Starting up http-server, serving ./
8686
>> Available on:
8787
>> http://127.0.0.1:8080
8888
>> Hit CTRL-C to stop the server
8989
>> 1357589 bytes written to dist/demos/nn-art/bundle.js (0.85 seconds) at 10:34:45 AM
9090
```
9191

92-
Then visit `http://localhost:8080/demos/nn-art/nn-art-demo.html`. The
92+
Then visit `http://localhost:8080/demos/nn-art/`. The
9393
`watch-demo` script monitors for changes of typescript code and does
9494
incremental compilation (~200-400ms), so users can have a fast edit-refresh
9595
cycle when developing apps.

demos/homepage/index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,14 @@ limitations under the License.
142142
<div class="demo-carousel mdl-grid">
143143
<div class="mdl-layout-spacer mdl-cell--hide-tablet mdl-cell--hide-phone"></div>
144144
<div class="demo-card mdl-card mdl-shadow--2dp square-card mdl-cell mdl-cell--3-col mdl-cell--8-col-tablet mdl-cell--4-col-phone">
145-
<a href="demos/model-builder/model-builder-demo.html">
145+
<a href="demos/model-builder/">
146146
<div class="mdl-card__title" id="model-builder">
147147
<span class="mdl-card__title-text">Model Builder</span>
148148
</div>
149149
</a>
150150
<div class="mdl-card__supporting-text">Build a neural network in your browser, without code!</div>
151151
<div class="mdl-card__actions mdl-card--border">
152-
<a href="demos/model-builder/model-builder-demo.html">
152+
<a href="demos/model-builder/">
153153
<button class="mdl-button mdl-button--raised mdl-button--colored mdl-js-button mdl-button--primary mdl-js-ripple-effect">
154154
Demo
155155
</button>
@@ -162,14 +162,14 @@ limitations under the License.
162162
</div>
163163
</div>
164164
<div class="demo-card mdl-card mdl-shadow--2dp square-card mdl-cell mdl-cell--3-col mdl-cell--8-col-tablet mdl-cell--4-col-phone">
165-
<a href="demos/imagenet/imagenet-demo.html">
165+
<a href="demos/imagenet/">
166166
<div class="mdl-card__title" id="webcam">
167167
<span class="mdl-card__title-text">Webcam Imagenet</span>
168168
</div>
169169
</a>
170170
<div class="mdl-card__supporting-text">Squeezenet running in the browser</div>
171171
<div class="mdl-card__actions mdl-card--border">
172-
<a href="demos/imagenet/imagenet-demo.html">
172+
<a href="demos/imagenet/">
173173
<button class="mdl-button mdl-button--raised mdl-button--colored mdl-js-button mdl-button--primary mdl-js-ripple-effect">
174174
Demo
175175
</button>
@@ -182,14 +182,14 @@ limitations under the License.
182182
</div>
183183
</div>
184184
<div class="demo-card mdl-card mdl-shadow--2dp square-card mdl-cell mdl-cell--3-col mdl-cell--8-col-tablet mdl-cell--4-col-phone ">
185-
<a href="demos/nn-art/nn-art-demo.html">
185+
<a href="demos/nn-art/">
186186
<div class="mdl-card__title" id="nnart">
187187
<span class="mdl-card__title-text">NNArt</span>
188188
</div>
189189
</a>
190190
<div class="mdl-card__supporting-text">Play with an animating CPPN</div>
191191
<div class="mdl-card__actions mdl-card--border">
192-
<a href="demos/nn-art/nn-art-demo.html">
192+
<a href="demos/nn-art/">
193193
<button class="mdl-button mdl-button--raised mdl-button--colored mdl-js-button mdl-button--primary mdl-js-ripple-effect">
194194
Demo
195195
</button>
@@ -202,14 +202,14 @@ limitations under the License.
202202
</div>
203203
</div>
204204
<div class="demo-card mdl-card mdl-shadow--2dp square-card mdl-cell mdl-cell--3-col mdl-cell--8-col-tablet mdl-cell--4-col-phone">
205-
<a href="demos/benchmarks/benchmark-demo.html">
205+
<a href="demos/benchmarks/">
206206
<div class="mdl-card__title" id="benchmarks">
207207
<span class="mdl-card__title-text">Benchmarks</span>
208208
</div>
209209
</a>
210210
<div class="mdl-card__supporting-text">Test the library's performance</div>
211211
<div class="mdl-card__actions mdl-card--border">
212-
<a href="demos/benchmarks/benchmark-demo.html">
212+
<a href="demos/benchmarks/">
213213
<button class="mdl-button mdl-button--raised mdl-button--colored mdl-js-button mdl-button--primary mdl-js-ripple-effect">
214214
Demo
215215
</button>

demos/lstm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ python scripts/dump_checkpoint_vars.py --output_dir=demos/lstm/ --checkpoint_fil
2121
Finally, start the demo:
2222

2323
```
24-
./scripts/watch-demo demos/lstm/lstm_inference.ts
24+
./scripts/watch-demo demos/lstm
2525
```

0 commit comments

Comments
 (0)