Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove missing Juvix examples and webapp example from docs build #1890

Merged
merged 6 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,12 @@ jobs:
cd main
make markdown-docs

- name: Generate HTML and Web App files from milestone examples
- name: Generate HTML files from examples
run: |
cd main
echo "$GITHUB_WORKSPACE/.local/bin" >> $GITHUB_PATH
make install
make html-examples
make webapp-examples
make demo-example

- name: Deploy HTML to github pages
Expand Down
12 changes: 0 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ EXAMPLES= Collatz/Collatz.juvix \
PascalsTriangle/PascalsTriangle.juvix \
TicTacToe/CLI/TicTacToe.juvix \
Tutorial/Tutorial.juvix \
ValidityPredicates/SimpleFungibleToken.juvix

EXAMPLE_WEBAPP_OUTPUT=_docs/examples/webapp
WEBAPP_EXAMPLES=TicTacToe/Web/TicTacToe.juvix
DEMO_EXAMPLE=examples/demo/Demo.juvix

MAKEAUXFLAGS?=-s
Expand Down Expand Up @@ -78,15 +75,6 @@ demo-example:
@mkdir -p ${OUTPUTDIR}
@juvix html $(DEMO_EXAMPLE) --output-dir=$(CURDIR)/${OUTPUTDIR}

.PHONY: webapp-examples
webapp-examples: $(WEBAPP_EXAMPLES)

$(WEBAPP_EXAMPLES):
$(eval OUTPUTDIR=$(EXAMPLE_WEBAPP_OUTPUT)/$(dir $@))
@mkdir -p ${OUTPUTDIR}
@juvix compile -t wasm -r standalone $(EXAMPLEMILESTONE)/$@
@cp $(dir $(EXAMPLEMILESTONE)/$@)* ${OUTPUTDIR}

# -- MDBook

docs/md/README.md : README.org
Expand Down
23 changes: 2 additions & 21 deletions examples/milestone/TicTacToe/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
** TicTacToe

This directory contains Juvix code for a Tic-Tac-Toe game that can be run as a
terminal application or a Web application.
terminal application.

The common logic code is in =Logic/=, the code specific to the terminal
application is in =CLI/= and the code specific to the Web application is in
=Web/=.
application is in =CLI/=.

*** Terminal application

Expand Down Expand Up @@ -36,21 +35,3 @@ Type a number then ENTER to make a move
+---+---+---+
Player X:
#+end_src

*** Web application

To compile the Web application use the following steps:

#+begin_src shell
cd Web
juvix compile -t wasm -r standalone TicTacToe.juvix
#+end_src

To run the Web application you must first serve the files in the =Web/=
directory, using Python for example:

#+begin_src shell
python3 -m http.server
#+end_src

Then navigate to [[http://localhost:8000]] in your browser.
175 changes: 0 additions & 175 deletions examples/milestone/TicTacToe/Web/TicTacToe.juvix

This file was deleted.

9 changes: 0 additions & 9 deletions examples/milestone/TicTacToe/Web/index.html

This file was deleted.

58 changes: 0 additions & 58 deletions examples/milestone/TicTacToe/Web/tictactoe.js

This file was deleted.