Skip to content

Commit 7e2b315

Browse files
authored
Merge pull request #387 from FormidableLabs/update-branding
Nearform branding
2 parents e9d28b0 + 0cf52c9 commit 7e2b315

35 files changed

+780
-293
lines changed

.github/actions/setup/action.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Setup
2+
description: Setup Build Step
3+
inputs:
4+
node-version:
5+
required: true
6+
default: '18.x'
7+
8+
runs:
9+
using: "composite"
10+
steps:
11+
- uses: pnpm/action-setup@v3
12+
with:
13+
version: 7
14+
15+
- name: Use Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: ${{ inputs.node-version }}
19+
cache: 'pnpm'
20+
21+
- name: Install dependencies
22+
shell: bash
23+
run: pnpm install

.github/workflows/code-check.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,9 @@ jobs:
1212
build:
1313
name: Check codebase (lint and typecheck)
1414
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
node-version: [ 18.x ]
1815
steps:
19-
- uses: actions/checkout@v2
20-
- uses: actions/setup-node@v2
21-
with:
22-
node-version: ${{ matrix.node-version }}
23-
24-
- uses: pnpm/[email protected]
25-
with:
26-
version: 7
27-
28-
- name: Get pnpm store directory
29-
id: pnpm-cache
30-
run: echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
31-
32-
- name: Setup pnpm cache
33-
uses: actions/cache@v3
34-
with:
35-
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
36-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('./pnpm-lock.yaml') }}
37-
restore-keys: |
38-
${{ runner.os }}-pnpm-store-
39-
40-
- name: Install dependencies
41-
run: pnpm install
16+
- uses: actions/checkout@v4
17+
- uses: ./.github/actions/setup
4218

4319
- name: Check Code ${{ matrix.node-version }}
4420
run: pnpm lint

.github/workflows/release.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,8 @@ jobs:
1818
pull-requests: write
1919

2020
steps:
21-
- uses: actions/checkout@v2
22-
- uses: actions/setup-node@v3
23-
with:
24-
node-version: 18
25-
26-
- uses: pnpm/[email protected]
27-
with:
28-
version: 7
29-
30-
- name: Get pnpm store directory
31-
id: pnpm-cache
32-
run: echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
33-
34-
- name: Setup pnpm cache
35-
uses: actions/cache@v3
36-
with:
37-
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
38-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
39-
restore-keys: |
40-
${{ runner.os }}-pnpm-store-
41-
42-
- name: Install dependencies
43-
run: pnpm install
21+
- uses: actions/checkout@v4
22+
- uses: ./.github/actions/setup
4423

4524
- name: Build packages
4625
run: pnpm run build
@@ -49,9 +28,6 @@ jobs:
4928
id: changesets
5029
uses: changesets/action@v1
5130
with:
52-
# Note: Our `package.json:scripts.version` currently doesn't have `--fix-lockfile` for
53-
# `pnpm install` because of a PNPM bug of some kind.
54-
# https://github.com/FormidableLabs/spectacle/issues/1156
5531
version: pnpm run version
5632
publish: pnpm changeset publish
5733
env:

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
<p align="center">
2-
<a href="https://formidable.com/open-source/" target="_blank">
3-
<img alt="React Live — Formidable, We build the modern web" src="https://raw.githubusercontent.com/FormidableLabs/react-live/master/react-live-Hero.png" />
2+
<a href="https://commerce.nearform.com/open-source/" target="_blank">
3+
<img alt="React Live — Formidable, We build the modern web" src="https://oss.nearform.com/api/banner.svg?text=react+live" />
44
</a>
55
</p>
66
<p align="center">
77
<strong>A flexible playground for live editing React code</strong>
88
<br><br>
99
<a href="https://npmjs.com/package/react-live"><img src="https://img.shields.io/npm/dm/react-live.svg"></a>
1010
<a href="https://npmjs.com/package/react-live"><img src="https://img.shields.io/npm/v/react-live.svg"></a>
11-
<img src="https://img.badgesize.io/https://unpkg.com/react-live/dist/react-live.min.js?compression=gzip&label=gzip%20size">
1211
<img src="https://img.badgesize.io/https://unpkg.com/react-live/dist/react-live.min.js?label=size">
1312
<img src="https://img.shields.io/badge/module%20formats-umd%2C%20cjs%2C%20esm-green.svg">
1413
<a href="https://github.com/FormidableLabs/react-live#maintenance-status">
@@ -22,7 +21,7 @@ The library is structured modularly and lets you style and compose its component
2221

2322
<p align="center"><img src="https://user-images.githubusercontent.com/17658189/63181897-1d67d380-c049-11e9-9dd2-7da2a3a57f05.gif" width=500></p>
2423

25-
Come learn more at our [docs site](https://formidable.com/open-source/react-live)!
24+
Come learn more at our [docs site](https://commerce.nearform.com/open-source/react-live)!
2625

2726
## Support
2827

docs/introduction.mdx

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import { DemoLiveEditor } from "../website/src/components/live-edit";
77

88
# Introduction
99

10-
[![React Live — Formidable, We build the modern web](https://raw.githubusercontent.com/FormidableLabs/react-live/master/react-live-Hero.png)](https://formidable.com/open-source/)
11-
1210
**React Live** brings you the ability to render React components with editable source code and live preview. React Live is structured modularly and lets you style and compose its components freely. The following demos show typical use cases including the editor, preview, and error pane components.
1311

1412
To see React Live in action, make changes to the following editor panes:
@@ -30,6 +28,17 @@ export const jsxExample = `
3028

3129
<DemoLiveEditor code={jsxExample} />
3230

31+
```jsx
32+
import { LiveProvider, LiveEditor, LivePreview } from "react-live";
33+
34+
<LiveProvider code={code}>
35+
<div className="grid grid-cols-2 gap-4">
36+
<LiveEditor className="font-mono" />
37+
<LivePreview />
38+
</div>
39+
</LiveProvider>
40+
```
41+
3342
### Render-function Demo
3443

3544
To render a series of components or render components beyond just JSX, React Live also provides a `render` function to pass JSX into when the `noInline` prop is present. This lets you render multiple or functional components with hooks. This example shows a functional component with a `useState` hook.
@@ -65,6 +74,17 @@ render(<Counter label="Counter" />)
6574

6675
<DemoLiveEditor code={noInlineExample} noInline />
6776

77+
```jsx
78+
import { LiveProvider, LiveEditor, LivePreview } from "react-live";
79+
80+
<LiveProvider code={code} noInline>
81+
<div className="grid grid-cols-2 gap-4">
82+
<LiveEditor className="font-mono" />
83+
<LivePreview />
84+
</div>
85+
</LiveProvider>
86+
```
87+
6888
### Syntax Error Demo
6989

7090
React Live can also display customizable errors when your code contains errors.
@@ -74,3 +94,15 @@ const badVariable = ;
7494
`.trim();
7595

7696
<DemoLiveEditor code={syntaxError} />
97+
98+
```jsx
99+
import { LiveProvider, LiveEditor, LivePreview, LiveError } from "react-live";
100+
101+
<LiveProvider code={code}>
102+
<div className="grid grid-cols-2 gap-4">
103+
<LiveEditor className="font-mono" />
104+
<LivePreview />
105+
<LiveError className="text-red-800 bg-red-100 mt-2" />
106+
</div>
107+
</LiveProvider>
108+
```

0 commit comments

Comments
 (0)