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
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

on:
push:
branches:
- main
pull_request:

jobs:
build-and-test:
name: 'Build & Test'
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'yarn'

- name: Install
uses: borales/actions-yarn@v5
with:
cmd: install

- name: Check Code Format
uses: borales/actions-yarn@v5
with:
cmd: format:check

- name: Lint
uses: borales/actions-yarn@v5
with:
cmd: lint

- name: Build
uses: borales/actions-yarn@v5
with:
cmd: build
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -899,9 +899,9 @@ You can show different buttons to each connection by wrapping a sub-tree in a `C
You don't need to specify the button's UCID in the scope - the correct UCID will be injected automatically.

```tsx
import {
Button,
ConnectionScopeProvider,
import {
Button,
ConnectionScopeProvider,
useConnectionScope,
} from 'react-node-insim';

Expand Down Expand Up @@ -956,7 +956,6 @@ function UserNameButton() {
}
```


### Global scope

You can show the same set of buttons to all connections wrapping a sub-tree in a `GlobalScopeProvider`.
Expand All @@ -969,12 +968,7 @@ import { Button, GlobalScopeProvider } from 'react-node-insim';
function App() {
return (
<GlobalScopeProvider>
<Button
top={0}
left={80}
height={5}
width={40}
>
<Button top={0} left={80} height={5} width={40}>
React Node InSim
</Button>
</GlobalScopeProvider>
Expand Down
8 changes: 4 additions & 4 deletions examples/env.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import dotenv from "dotenv";
import fs from "fs";
import path from "path";
import dotenv from 'dotenv';
import fs from 'fs';
import path from 'path';

const dotenvPath = path.resolve(".env");
const dotenvPath = path.resolve('.env');

[`${dotenvPath}.local`, dotenvPath].forEach((dotenvFile) => {
if (fs.existsSync(dotenvFile)) {
Expand Down
Loading