Skip to content

Commit

Permalink
Use spaces in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed May 25, 2023
1 parent b36c4ac commit 167c97e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ indent_size = 4
indent_size = 8

[*.md]
indent_style = space
trim_trailing_whitespace = false

# Ideal settings - some plugins might support these.
Expand Down
24 changes: 12 additions & 12 deletions api/switch.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Your application code may also use this event to update the UI or render a game
```ts
let frameCount = 0;
Switch.addEventListener('frame', () => {
console.log(`frame: ${frameCount++}`);
console.log(`frame: ${frameCount++}`);
});
```
Expand All @@ -65,8 +65,8 @@ by hitting the Home button.
```ts
Switch.addEventListener('exit', () => {
const logFile = new URL('debug.log', Switch.cwd());
Switch.writeFileSync(logFile, `Exited at ${new Date()}`);
const logFile = new URL('debug.log', Switch.cwd());
Switch.writeFileSync(logFile, `Exited at ${new Date()}`);
});
```
Expand All @@ -80,9 +80,9 @@ You may use `Button` enum from the `nxjs-constants` module with a bitwise `&` to
import { Button } from 'nxjs-constants';

Switch.addEventListener('buttondown', (event) => {
if (event.detail & Button.A) {
console.log('A button pressed');
}
if (event.detail & Button.A) {
console.log('A button pressed');
}
});
```
Expand All @@ -96,9 +96,9 @@ You may use `Button` enum from the `nxjs-constants` module with a bitwise `&` to
import { Button } from 'nxjs-constants';

Switch.addEventListener('buttonup', (event) => {
if (event.detail & Button.A) {
console.log('A button was released');
}
if (event.detail & Button.A) {
console.log('A button was released');
}
});
```
Expand All @@ -108,8 +108,8 @@ Emitted while interacting with the touchscreen. These events follow the Web [Tou
```ts
Switch.addEventListener('touchmove', (e) => {
for (const touch of e.changedTouches) {
console.log(`${touch.identifier}: ${touch.screenX} x ${touch.screenY}`);
}
for (const touch of e.changedTouches) {
console.log(`${touch.identifier}: ${touch.screenX} x ${touch.screenY}`);
}
});
```

0 comments on commit 167c97e

Please sign in to comment.