Skip to content

Commit

Permalink
Merge branch 'native-image'
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanoverna committed Apr 2, 2024
2 parents e443350 + 33b8e89 commit ee96715
Show file tree
Hide file tree
Showing 96 changed files with 1,707 additions and 110,225 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Node.js CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- run: npm test
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ coverage
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.next
.next
react-datocms.tgz
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
17 changes: 4 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ npm install react-datocms

This package offers different components and hooks. Please refer to one of the following pages to learn more about a specific area of interest:

* [`<Image />` component for responsive/progressive images](./docs/image.md)
* [`<SRCImage />` and `<Image />` components for responsive/progressive images](./docs/image.md)
* [`<StructuredText />` component](./docs/structured-text.md)
* [`<VideoPlayer />` component](./docs/video-player.md)
* [`useQuerySubscription()` hook for live, real-time updates of content](./docs/live-real-time-updates.md)
Expand All @@ -35,23 +35,14 @@ Live demo: [https://react-datocms-example.netlify.com/](https://react-datocms-ex

# Development

This repository contains a number of demos/examples. You can use them to locally test your changes to the package with `npm link`:
This repository contains a number of demos/examples. You can use them to locally test your changes.

```
npm link
cd examples/images-and-seo/vanilla-react
npm link react-datocms
cd examples
npm setup
npm run start
```

Now on another terminal you can run:

```
npm run watch
```

This will re-compile the package everytime you make a change, and the example project will pick those changes instantly.

<!--datocms-autoinclude-footer start-->
-----------------
# What is DatoCMS?
Expand Down
74 changes: 45 additions & 29 deletions docs/image.md

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions docs/live-real-time-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ Live updates are great both to get instant previews of your content while editin
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [Live real-time updates](#live-real-time-updates)
- [Table of Contents](#table-of-contents)
- [Installation](#installation)
- [Reference](#reference)
- [Initialization options](#initialization-options)
- [Connection status](#connection-status)
- [Error object](#error-object)
- [Example](#example)
- [Installation](#installation)
- [Reference](#reference)
- [Initialization options](#initialization-options)
- [Connection status](#connection-status)
- [Error object](#error-object)
- [Example](#example)
- [The `fetcher` option](#the-fetcher-option)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Expand Down
16 changes: 7 additions & 9 deletions docs/meta-tags.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ Just like for the [image component](./image.md) this package offers a number of
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [Social share, SEO and Favicon meta tags](#social-share-seo-and-favicon-meta-tags)
- [Table of Contents](#table-of-contents)
- [Installation](#installation)
- [General usage](#general-usage)
- [`renderMetaTags()`](#rendermetatags)
- [`renderMetaTagsToString()`](#rendermetatagstostring)
- [`toRemixMeta()`](#toremixmeta)
- [For Remix v1: `toRemixV1Meta()`](#for-remix-v1-toremixv1meta)
- [`toNextMetadata()`](#tonextmetadata)
- [Installation](#installation)
- [General usage](#general-usage)
- [`renderMetaTags()`](#rendermetatags)
- [`renderMetaTagsToString()`](#rendermetatagstostring)
- [`toRemixMeta()`](#toremixmeta)
- [For Remix v1: `toRemixV1Meta()`](#for-remix-v1-toremixv1meta)
- [`toNextMetadata()`](#tonextmetadata)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Expand Down
15 changes: 15 additions & 0 deletions docs/video-player.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [`<VideoPlayer/>` component for easy video integration.](#videoplayer-component-for-easy-video-integration)
- [Out-of-the-box features](#out-of-the-box-features)
- [Installation](#installation)
- [Usage](#usage)
- [Example](#example)
- [Props](#props)
- [Advanced usage: the `useVideoPlayer` hook](#advanced-usage-the-usevideoplayer-hook)
- [Example](#example-1)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

# `<VideoPlayer/>` component for easy video integration.

`<VideoPlayer />` is a React component specially designed to work seamlessly with DatoCMS’s [`video` GraphQL query](https://www.datocms.com/docs/content-delivery-api/images-and-videos#videos) that optimizes video streaming for your sites.
Expand Down
5 changes: 0 additions & 5 deletions examples/video/README.md → examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
The page will reload when you make changes.\
You may also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
Expand Down
1 change: 0 additions & 1 deletion examples/images-and-seo/emotion/.env

This file was deleted.

23 changes: 0 additions & 23 deletions examples/images-and-seo/emotion/README.md

This file was deleted.

Loading

0 comments on commit ee96715

Please sign in to comment.