Skip to content

Commit eb595a4

Browse files
Doc upgrades (#175)
* upgrade to docusaurus to 3.1.1, ts to 5.2.2, and react to 18.0.0. plus required adjustments. * upgrade docusaurus to 3.2.1 * fix features background in dark mode * fix broken link * Nuke lockfile * Trigger CI * Remove vercel specific configs --------- Co-authored-by: Christy Presler <cpresler@users.noreply.github.com> Co-authored-by: Charlie Brown <carbonrobot@gmail.com>
1 parent 1f14d46 commit eb595a4

File tree

16 files changed

+8512
-9548
lines changed

16 files changed

+8512
-9548
lines changed

docs/api/matchers.md renamed to docs/api/matchers.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar_position: 3
44

55
# Matchers
66

7-
### toMatchBaseline(options: {threshold?: number} = {threshold: 0.1})
7+
### toMatchBaseline(options: \{threshold?: number\} = \{threshold: 0.1\})
88

99
This custom Jest matcher will try to find and compare the baseline screenshot by using the path of the latest screenshot (returned by `takeScreenshot()`). You will have to take a screenshot before using, and pass the path of that screenshot to the expect method.
1010

docs/api/methods.md renamed to docs/api/methods.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ describe('App.tsx', () => {
170170
});
171171
```
172172

173-
### scrollTo(testID: string, position: {x?: number, y?: number})
173+
### scrollTo(testID: string, position: \{x?: number, y?: number\})
174174

175175
Calls the `scrollTo` method of the element where its `testID` prop matches the methods `testID` argument.
176176

File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/introduction/getting-started.md renamed to docs/introduction/getting-started.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
sidebar_position: 1
33
---
44

5+
import Tabs from '@theme/Tabs';
6+
import TabItem from '@theme/TabItem';
7+
58
# Getting Started
69

710
### React Native Version Support
@@ -58,7 +61,7 @@ or
5861

5962
### Add tests
6063

61-
Use the [takeScreenshot](/docs/api/methods#takescreenshotname-string) and [.toMatchBaseline](/docs/api/matchers#tomatchbaselinename-string) apis to implement screenshot tests. File names must end in `.owl.ts`, `.owl.tsx`, `.owl.js` or `.owl.jsx`. [See the example app](https://github.com/FormidableLabs/react-native-owl/tree/main/example) for a more complete example.
64+
Use the [takeScreenshot](/docs/api/methods#takescreenshotname-string) and [.toMatchBaseline](/docs/api/matchers) apis to implement screenshot tests. File names must end in `.owl.ts`, `.owl.tsx`, `.owl.js` or `.owl.jsx`. [See the example app](https://github.com/FormidableLabs/react-native-owl/tree/main/example) for a more complete example.
6265

6366
#### Example
6467

File renamed without changes.

website/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Website
22

3-
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
3+
This website is built using [Docusaurus 3](https://docusaurus.io/), a modern static website generator.
44

55
### Installation
66

website/docusaurus.config.js

Lines changed: 0 additions & 119 deletions
This file was deleted.

website/docusaurus.config.ts

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
import { themes as prismThemes } from "prism-react-renderer" ;
2+
import type { Config } from "@docusaurus/types";
3+
import type * as Preset from "@docusaurus/preset-classic";
4+
5+
const config: Config = {
6+
title: 'React Native Owl',
7+
tagline: 'Visual Regression Testing for React Native',
8+
url: 'https://commerce.nearform.com/',
9+
baseUrl: '/open-source/react-native-owl/',
10+
onBrokenLinks: 'throw',
11+
onBrokenMarkdownLinks: 'warn',
12+
favicon: 'images/favicon.ico',
13+
organizationName: 'Nearform Commerce',
14+
projectName: 'react-native-owl',
15+
i18n: {
16+
defaultLocale: "en",
17+
locales: ["en"],
18+
},
19+
presets: [
20+
[
21+
"classic",
22+
{
23+
docs: {
24+
path: '../docs',
25+
sidebarPath: './sidebars.js',
26+
editUrl:
27+
'https://github.com/FormidableLabs/react-native-owl/edit/main/website/',
28+
},
29+
theme: {
30+
customCss: require.resolve('./src/css/custom.css'),
31+
},
32+
...(process.env.VERCEL_ENV === 'production' && {
33+
gtag: {
34+
trackingID: process.env.GTAG_TRACKING_ID,
35+
anonymizeIP: true,
36+
},
37+
googleTagManager: {
38+
containerId: process.env.GTM_CONTAINER_ID,
39+
},
40+
}),
41+
},
42+
],
43+
],
44+
45+
themeConfig: {
46+
metadata: [
47+
{
48+
name: "viewport",
49+
content: "width=device-width, initial-scale=1, maximum-scale=1",
50+
image: '/images/social.png',
51+
},
52+
],
53+
navbar: {
54+
style: 'dark',
55+
title: 'React Native Owl',
56+
logo: {
57+
alt: 'React Native Owl Logo',
58+
src: 'images/logo-eyes.svg',
59+
},
60+
items: [
61+
{
62+
label: 'Documentation',
63+
position: 'left',
64+
items: [
65+
{
66+
label: 'Getting Started',
67+
to: '/docs/introduction/getting-started/',
68+
},
69+
{
70+
label: 'Config File',
71+
to: '/docs/introduction/config-file/',
72+
},
73+
{
74+
label: 'CLI',
75+
to: '/docs/cli/building-the-app/',
76+
},
77+
{
78+
label: 'Methods',
79+
to: '/docs/api/methods/',
80+
},
81+
{
82+
label: 'Matchers',
83+
to: '/docs/api/matchers/',
84+
},
85+
],
86+
},
87+
{
88+
href: 'https://github.com/FormidableLabs/react-native-owl',
89+
className: 'header-github-link',
90+
'aria-label': 'GitHub Repository',
91+
position: 'right',
92+
},
93+
{
94+
href: 'https://commerce.nearform.com/',
95+
className: 'header-nearform-link',
96+
'aria-label': 'Nearform Commerce Website',
97+
position: 'right',
98+
},
99+
],
100+
},
101+
footer: {
102+
style: 'dark',
103+
logo: {
104+
alt: "Nearform logo",
105+
src: "images/nearform-logo-white.svg",
106+
href: "https://commerce.nearform.com",
107+
width: 100,
108+
height: 100,
109+
},
110+
copyright: `Copyright © ${new Date().getFullYear()} Nearform`,
111+
},
112+
prism: {
113+
defaultLanguage: 'javascript',
114+
theme: prismThemes.github,
115+
darkTheme: prismThemes.dracula,
116+
},
117+
} satisfies Preset.ThemeConfig,
118+
};
119+
120+
export default config;

0 commit comments

Comments
 (0)