Skip to content

Commit

Permalink
Fixed generating the static demos viewer. Made naming consistent.
Browse files Browse the repository at this point in the history
  • Loading branch information
TPReal committed Apr 15, 2023
1 parent 11a2269 commit 5584a7d
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .ignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.vscode
docs
static-demo-viewer
static-demos-viewer
wiki
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ both for cutting and engraving.

## Quick start

### [Live demo](https://htmlpreview.github.io/?https://github.com/TPReal/tp-vector/blob/main/static-demo-viewer/index.html&width=500)
### [Live demo](https://htmlpreview.github.io/?https://github.com/TPReal/tp-vector/blob/main/static-demos-viewer/index.html&width=500)

A collection of demo projects (defined [here](src/viewer/demos_viewer.ts)),
where you can preview the files, as well as download SVG files suitable for the
Expand Down
2 changes: 1 addition & 1 deletion cmds/demos-viewer
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

esbuild \
src/viewer/viewer.ts \
--alias:tp-vector=./src \
--watch=forever \
--alias:tp-vector=./src \
--bundle \
--format=esm \
--sourcemap \
Expand Down
8 changes: 0 additions & 8 deletions cmds/gen-static-demo-viewer

This file was deleted.

9 changes: 9 additions & 0 deletions cmds/gen-static-demos-viewer
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Rebuild the viewer in the static-demos-viewer directory.
esbuild \
src/viewer/static_demos_viewer.ts \
--alias:tp-vector=./src \
--bundle \
--minify \
--outdir=static-demos-viewer \
--charset=utf8 \
--loader:.png=dataurl \
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {DEMOS_VIEWER} from './demos_viewer.ts';
import {Viewer} from './viewer_tools.ts';

// The static demo viewer. It is used to create a pre-compiled live demo.
// The static demos viewer. It is used to create a pre-compiled live demo.
// It uses IIFE to allow compiling into a non-module JS file,
// because of some limitations of the HTML viewer currently used.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<title>Demo Projects Viewer</title>
</head>
<body>
<script src="./static_demo_viewer.js" charset="utf-8"></script>
<script src="./static_demos_viewer.js" charset="utf-8"></script>
</body>
</html>
File renamed without changes.
File renamed without changes

0 comments on commit 5584a7d

Please sign in to comment.