Skip to content
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Generated files
.docusaurus
.cache-loader
static/springroll-io-demo-game

# Misc
.DS_Store
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"version": "0.0.0",
"private": true,
"scripts": {
"prebuild": "./scripts/clone-demo-game.sh",
"preserve": "./scripts/clone-demo-game.sh",
"prestart": "./scripts/clone-demo-game.sh",
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
Expand Down
13 changes: 13 additions & 0 deletions scripts/clone-demo-game.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'

# Create the folder where we'll drop the demo game contents
rm -rf static/springroll-io-demo-game
mkdir static/springroll-io-demo-game

# Clone down the demo game
rm -rf springroll-io-demo-game
git clone --depth=1 https://github.com/SpringRoll/springroll-io-demo-game.git
cp -R springroll-io-demo-game/docs/* static/springroll-io-demo-game
rm -rf springroll-io-demo-game
4 changes: 2 additions & 2 deletions src/components/GameDemo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default function GameDemo(): JSX.Element {
});

// Open the game
containerRef.current.openPath('http://springroll.io/springroll-io-demo-game/');
containerRef.current.openPath('/springroll-io-demo-game/index.html');

};

Expand Down Expand Up @@ -115,4 +115,4 @@ export default function GameDemo(): JSX.Element {
</div>
</section>
);
}
}