Skip to content

Commit

Permalink
Use transpiled JS
Browse files Browse the repository at this point in the history
  • Loading branch information
danstewart committed Jan 23, 2022
1 parent 0d85e05 commit f723839
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ if [[ $serve == 1 ]]; then

# Transpile JS
# TODO: Watch and recompile on change
swc js -d build
swc js -d build/js

# Serve
python3 -m http.server
fi

if [[ $build == 1 ]]; then
swc src/js -d src/build
swc src/js -d src/build/js
fi
2 changes: 1 addition & 1 deletion src/game.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<link rel="stylesheet" href="https://unpkg.com/chota@latest">
<link rel="stylesheet" href="./css/main.css">

<script type="module" src="js/game.js"></script>
<script type="module" src="./build/js/game.js"></script>
<!-- <script src="https://unpkg.com/@ungap/custom-elements"></script> -->
<script src="https://unpkg.com/@webcomponents/webcomponentsjs@2.0.0/webcomponents-bundle.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<link rel="stylesheet" href="https://unpkg.com/chota@latest">
<link rel="stylesheet" href="./css/main.css">

<script type="module" src="js/index.js"></script>
<script type="module" src="./build/js/index.js"></script>
</head>

<body>
Expand Down

0 comments on commit f723839

Please sign in to comment.