Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
Fix require of raw code samples in demo slides.
Browse files Browse the repository at this point in the history
  • Loading branch information
carloskelly13 committed Nov 1, 2022
1 parent 59a6a12 commit 1a93a70
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 25 deletions.
7 changes: 4 additions & 3 deletions demo/slides/loop.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import React from 'react';
import Slide from './slide';


export default {
slides: [
<Slide>
Expand All @@ -13,7 +14,7 @@ export default {
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/raf.example')}
{require('raw-loader!../code-samples/raf.example').default}
</code>
</pre>
</Slide>,
Expand All @@ -23,7 +24,7 @@ export default {
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/loop.example')}
{require('raw-loader!../code-samples/loop.example').default}
</code>
</pre>
</Slide>,
Expand All @@ -33,7 +34,7 @@ export default {
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/loop-use.example')}
{require('raw-loader!../code-samples/loop-use.example').default}
</code>
</pre>
</Slide>,
Expand Down
18 changes: 9 additions & 9 deletions demo/slides/physics.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default {
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/physics-simple.example')}
{require('raw-loader!../code-samples/physics-simple.example').default}
</code>
</pre>
</Slide>,
Expand All @@ -24,14 +24,14 @@ export default {
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/physics-world.example')}
{require('raw-loader!../code-samples/physics-world.example').default}
</code>
</pre>
</Slide>,
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/physics-world-init.example')}
{require('raw-loader!../code-samples/physics-world-init.example').default}
</code>
</pre>
</Slide>,
Expand All @@ -41,7 +41,7 @@ export default {
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/physics-update.example')}
{require('raw-loader!../code-samples/physics-update.example').default}
</code>
</pre>
</Slide>,
Expand All @@ -51,14 +51,14 @@ export default {
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/physics-body.example')}
{require('raw-loader!../code-samples/physics-body.example').default}
</code>
</pre>
</Slide>,
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/physics-body-update.example')}
{require('raw-loader!../code-samples/physics-body-update.example').default}
</code>
</pre>
</Slide>,
Expand All @@ -71,21 +71,21 @@ export default {
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/physics-store.example')}
{require('raw-loader!../code-samples/physics-store.example').default}
</code>
</pre>
</Slide>,
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/physics-mobx-update.example')}
{require('raw-loader!../code-samples/physics-mobx-update.example').default}
</code>
</pre>
</Slide>,
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/physics-style.example')}
{require('raw-loader!../code-samples/physics-style.example').default}
</code>
</pre>
</Slide>,
Expand Down
8 changes: 4 additions & 4 deletions demo/slides/scaling.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default {
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/stage.example')}
{require('raw-loader!../code-samples/stage.example').default}
</code>
</pre>
</Slide>,
Expand All @@ -33,14 +33,14 @@ export default {
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/stage-size.example')}
{require('raw-loader!../code-samples/stage-size.example').default}
</code>
</pre>
</Slide>,
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/stage-use.example')}
{require('raw-loader!../code-samples/stage-use.example').default}
</code>
</pre>
</Slide>,
Expand All @@ -50,7 +50,7 @@ export default {
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/stage-blurry.example')}
{require('raw-loader!../code-samples/stage-blurry.example').default}
</code>
</pre>
</Slide>,
Expand Down
6 changes: 3 additions & 3 deletions demo/slides/sprites.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ export default {
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/sprite-manual.example')}
{require('raw-loader!../code-samples/sprite-manual.example').default}
</code>
</pre>
</Slide>,
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/sprite-style.example')}
{require('raw-loader!../code-samples/sprite-style.example').default}
</code>
</pre>
</Slide>,
Expand All @@ -43,7 +43,7 @@ export default {
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/sprite.example')}
{require('raw-loader!../code-samples/sprite.example').default}
</code>
</pre>
</Slide>,
Expand Down
12 changes: 6 additions & 6 deletions demo/slides/tilemaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default {
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/tilemap-map.example')}
{require('raw-loader!../code-samples/tilemap-map.example').default}
</code>
</pre>
</Slide>,
Expand All @@ -36,14 +36,14 @@ export default {
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/tilemap-manual.example')}
{require('raw-loader!../code-samples/tilemap-manual.example').default}
</code>
</pre>
</Slide>,
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/tilemap-render.example')}
{require('raw-loader!../code-samples/tilemap-render.example').default}
</code>
</pre>
</Slide>,
Expand All @@ -53,14 +53,14 @@ export default {
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/tilemap.example')}
{require('raw-loader!../code-samples/tilemap.example').default}
</code>
</pre>
</Slide>,
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/tilemap-buildings.example')}
{require('raw-loader!../code-samples/tilemap-buildings.example').default}
</code>
</pre>
</Slide>,
Expand All @@ -70,7 +70,7 @@ export default {
<Slide>
<pre>
<code className="language-javascript">
{require('raw-loader!../code-samples/tilemap-custom.example')}
{require('raw-loader!../code-samples/tilemap-custom.example').default}
</code>
</pre>
</Slide>,
Expand Down

0 comments on commit 1a93a70

Please sign in to comment.