react-obsidian 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/Obsidian.d.ts +2 -2
- package/dist/src/Obsidian.d.ts.map +1 -1
- package/dist/src/Obsidian.js.map +1 -1
- package/dist/src/graph/registry/GraphRegistry.d.ts +1 -0
- package/dist/src/graph/registry/GraphRegistry.d.ts.map +1 -1
- package/dist/src/graph/registry/GraphRegistry.js +8 -1
- package/dist/src/graph/registry/GraphRegistry.js.map +1 -1
- package/dist/src/graph/registry/NullProps.d.ts +4 -0
- package/dist/src/graph/registry/NullProps.d.ts.map +1 -0
- package/dist/src/graph/registry/NullProps.js +25 -0
- package/dist/src/graph/registry/NullProps.js.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/utils/isDev.d.ts +2 -0
- package/dist/src/utils/isDev.d.ts.map +1 -0
- package/dist/src/utils/isDev.js +17 -0
- package/dist/src/utils/isDev.js.map +1 -0
- package/dist/test/fixtures/LifecycleBoundGraph.d.ts +3 -2
- package/dist/test/fixtures/LifecycleBoundGraph.d.ts.map +1 -1
- package/dist/test/fixtures/LifecycleBoundGraph.js +9 -0
- package/dist/test/fixtures/LifecycleBoundGraph.js.map +1 -1
- package/dist/testkit/index.d.ts +6 -1
- package/dist/testkit/index.d.ts.map +1 -1
- package/dist/testkit/index.js +11 -17
- package/dist/testkit/index.js.map +1 -1
- package/dist/testkit/mockGraphs.d.ts +4 -0
- package/dist/testkit/mockGraphs.d.ts.map +1 -0
- package/dist/testkit/mockGraphs.js +23 -0
- package/dist/testkit/mockGraphs.js.map +1 -0
- package/dist/testkit/mockModel.d.ts +3 -0
- package/dist/testkit/mockModel.d.ts.map +1 -0
- package/dist/testkit/mockModel.js +14 -0
- package/dist/testkit/mockModel.js.map +1 -0
- package/package.json +1 -1
- package/src/Obsidian.ts +3 -3
- package/src/graph/registry/GraphRegistry.ts +9 -1
- package/src/graph/registry/NullProps.ts +23 -0
- package/src/index.ts +1 -0
- package/src/utils/isDev.ts +12 -0
- package/testkit/index.ts +11 -14
- package/testkit/mockGraphs.ts +20 -0
- package/testkit/mockModel.ts +10 -0
- package/.buildkite/pipeline.yml +0 -10
- package/.eslintignore +0 -1
- package/.eslintrc.json +0 -104
- package/.vscode/settings.json +0 -5
- package/babel.config.js +0 -13
- package/documentation/README.md +0 -41
- package/documentation/babel.config.js +0 -3
- package/documentation/blog/2019-05-28-first-blog-post.md +0 -12
- package/documentation/blog/2019-05-29-long-blog-post.md +0 -44
- package/documentation/blog/2021-08-01-mdx-blog-post.mdx +0 -20
- package/documentation/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg +0 -0
- package/documentation/blog/2021-08-26-welcome/index.md +0 -25
- package/documentation/blog/authors.yml +0 -17
- package/documentation/docs/documentation/documentation.mdx +0 -190
- package/documentation/docs/documentation/installation.mdx +0 -56
- package/documentation/docs/documentation/meta/clearingGraphs.mdx +0 -13
- package/documentation/docs/documentation/meta/middlewares.mdx +0 -27
- package/documentation/docs/documentation/usage/ClassComponents.mdx +0 -18
- package/documentation/docs/documentation/usage/Classes.mdx +0 -41
- package/documentation/docs/documentation/usage/FunctionalComponents.mdx +0 -57
- package/documentation/docs/documentation/usage/Graphs.mdx +0 -154
- package/documentation/docs/documentation/usage/Hooks.mdx +0 -85
- package/documentation/docs/documentation/usage/Reactivity.mdx +0 -116
- package/documentation/docs/documentation/usage/ServiceLocator.mdx +0 -38
- package/documentation/docs/documentation/usage/_category_.json +0 -9
- package/documentation/docs/guides/configurableApplications.mdx +0 -205
- package/documentation/docs/guides/mockDependencies.mdx +0 -141
- package/documentation/docusaurus.config.js +0 -151
- package/documentation/package-lock.json +0 -22975
- package/documentation/package.json +0 -47
- package/documentation/sidebars.js +0 -34
- package/documentation/src/components/HomepageFeatures/index.tsx +0 -71
- package/documentation/src/components/HomepageFeatures/styles.module.css +0 -11
- package/documentation/src/css/custom.css +0 -30
- package/documentation/src/pages/index.module.css +0 -23
- package/documentation/src/pages/index.tsx +0 -41
- package/documentation/src/pages/playground/index.mdx +0 -21
- package/documentation/src/theme/SearchBar.js +0 -19
- package/documentation/static/.nojekyll +0 -0
- package/documentation/static/img/api.svg +0 -101
- package/documentation/static/img/favicon.ico +0 -0
- package/documentation/static/img/logo.svg +0 -265
- package/documentation/static/img/obsidian.png +0 -0
- package/documentation/static/img/prototype.svg +0 -1
- package/documentation/static/img/stethoscope.svg +0 -37
- package/documentation/tsconfig.json +0 -7
- package/documentation/yarn.lock +0 -8167
- package/example/.buckconfig +0 -6
- package/example/.editorconfig +0 -3
- package/example/.eslintrc.js +0 -4
- package/example/.flowconfig +0 -65
- package/example/.gitattributes +0 -3
- package/example/.prettierrc.js +0 -7
- package/example/.watchmanconfig +0 -1
- package/example/App.tsx +0 -31
- package/example/MyInjectedComponent.tsx +0 -37
- package/example/__tests__/App-test.js +0 -14
- package/example/android/app/BUCK +0 -55
- package/example/android/app/build.gradle +0 -227
- package/example/android/app/build_defs.bzl +0 -19
- package/example/android/app/debug.keystore +0 -0
- package/example/android/app/proguard-rules.pro +0 -10
- package/example/android/app/src/debug/AndroidManifest.xml +0 -13
- package/example/android/app/src/debug/java/com/example/ReactNativeFlipper.java +0 -72
- package/example/android/app/src/main/AndroidManifest.xml +0 -25
- package/example/android/app/src/main/java/com/example/MainActivity.java +0 -15
- package/example/android/app/src/main/java/com/example/MainApplication.java +0 -80
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/values/strings.xml +0 -3
- package/example/android/app/src/main/res/values/styles.xml +0 -8
- package/example/android/build.gradle +0 -38
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/example/android/gradle.properties +0 -28
- package/example/android/gradlew +0 -185
- package/example/android/gradlew.bat +0 -89
- package/example/android/settings.gradle +0 -3
- package/example/app.json +0 -4
- package/example/babel.config.js +0 -8
- package/example/index.js +0 -9
- package/example/ios/Podfile +0 -30
- package/example/ios/Podfile.lock +0 -526
- package/example/ios/example/AppDelegate.h +0 -8
- package/example/ios/example/AppDelegate.m +0 -62
- package/example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json +0 -38
- package/example/ios/example/Images.xcassets/Contents.json +0 -6
- package/example/ios/example/Info.plist +0 -55
- package/example/ios/example/LaunchScreen.storyboard +0 -47
- package/example/ios/example/main.m +0 -9
- package/example/ios/example.xcodeproj/project.pbxproj +0 -689
- package/example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme +0 -88
- package/example/ios/example.xcworkspace/contents.xcworkspacedata +0 -10
- package/example/ios/example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/example/ios/exampleTests/Info.plist +0 -24
- package/example/ios/exampleTests/exampleTests.m +0 -65
- package/example/metro.config.js +0 -44
- package/example/package.json +0 -35
- package/example/tsconfig.json +0 -42
- package/global.d.ts +0 -1
- package/jest.config.js +0 -17
- package/jest.setup-after-env.js +0 -4
- package/tsconfig.base.json +0 -42
- package/tsconfig.json +0 -3
- package/tsconfig.prod.json +0 -7
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
sidebar_position: 1
|
|
3
|
-
title: 'Mocking dependencies in unit tests'
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Tests are an integral part of any software project. They let you verify that your code works as expected and that it doesn't break when you make changes. We want our tests to be as clear as possible so that developers don't have to waste time figuring out what the test is doing our how to fix it when it fails.
|
|
7
|
-
|
|
8
|
-
Obsidian promotes Object Oriented design, a paradigm that focuses on the relationships between objects and how they interact with each other. In this article we'll learn how adopting this approach lets us mock objects more easily and as a result improve the readability and maintainability of our tests.
|
|
9
|
-
|
|
10
|
-
:::tip On readable tests and developer velocity
|
|
11
|
-
"Every time the developers have to stop and puzzle through a test to figure out what it means, they have less time left to spend on creating new features, and the team velocity drops."
|
|
12
|
-
|
|
13
|
-
— [Growing Object-Oriented Software, Guided by Tests](https://www.amazon.com/Growing-Object-Oriented-Software-Guided-Tests/dp/0321503627)
|
|
14
|
-
:::
|
|
15
|
-
|
|
16
|
-
## The problem
|
|
17
|
-
The setup phase of a test is often the most complex part of the test. It involves creating test data, mocking dependencies and instantiating the unit-under-test. We've identified three common problems that make tests brittle, difficult to maintain, and hard to understand:
|
|
18
|
-
1. **Partial mocks** - a unit test is meant to test a single unit of code in isolation. If a dependency is partially mocked, our test is no longer testing a single unit. A bug in the partially mocked dependency can cause this unit test to fail preventing us from quickly identifying the root cause of the failure.
|
|
19
|
-
2. **Dependencies are introduced implicitly to the unit-under-test, usually via imports** - we should always create valid objects. If an object depends on another object, we should pass that dependency explicity in through the constructor. The constructor serves as the contract for the dependencies that a class requires to function. There's no point in creating partially working classes, and the constructor is used to enforces this constraint.
|
|
20
|
-
3. **Manual mocks** - manually mocking dependencies is a tedious and error prone process. It's easy to forget to mock a dependency, or to mock it incorrectly.
|
|
21
|
-
|
|
22
|
-
To illustrate these problems, let's look at a simple example.
|
|
23
|
-
|
|
24
|
-
```js showLineNumbers
|
|
25
|
-
describe('Example', () => {
|
|
26
|
-
const openURL = jest.fn();
|
|
27
|
-
|
|
28
|
-
let logger;
|
|
29
|
-
let foo;
|
|
30
|
-
let uut;
|
|
31
|
-
|
|
32
|
-
beforeEach(() => {
|
|
33
|
-
// Problem 1: Partial mocks
|
|
34
|
-
logger = require('./Logger');
|
|
35
|
-
logger.log = jest.fn();
|
|
36
|
-
const spy = jest.spyOn(logger, 'warn');
|
|
37
|
-
|
|
38
|
-
// Problem 2: Implicit dependencies.
|
|
39
|
-
// Our UUT uses Linking.openUrl so we mock it on the module level.
|
|
40
|
-
jest.mock('react-native', () => ({
|
|
41
|
-
Linking: {
|
|
42
|
-
openURL
|
|
43
|
-
},
|
|
44
|
-
}));
|
|
45
|
-
// Problem 3: Manual mocks
|
|
46
|
-
foo = {
|
|
47
|
-
doSomething: jest.fn(),
|
|
48
|
-
}
|
|
49
|
-
uut = new Example(logger, foo);
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## The solution
|
|
55
|
-
To achieve our goal of reducing boilerplate and improving readability, we'll refactor the above example as follows:
|
|
56
|
-
1. **Convert all dependencies to ES6 classes** - this will allow us to mock them using [jest-mock-extended](https://github.com/marchaos/jest-mock-extended) - a library that lets us create mock classes in a type-safe manner.
|
|
57
|
-
2. **Pass dependencies in through the constructor** - we'll pass the dependencies explicitly to the unit-under-test. This step will require us to declare new classes that will encapsulate interactions with third-party libraries.
|
|
58
|
-
|
|
59
|
-
<!-- In Object Oriented design, logic is encapsulated in classes that are introduced (injected) to one another in through the constructor. -->
|
|
60
|
-
<!-- This approach lets us use modern mocking techniques that require less boilerplate and are easier to reason about. -->
|
|
61
|
-
<!-- To achieve our goal, we'll do two things:
|
|
62
|
-
First,
|
|
63
|
-
First, refactor our code to use dependency injection.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
To achieve our goal, we'll use an open-source library called [jest-mock-extended](https://github.com/marchaos/jest-mock-extended) which provides a `mock` function that creates a mock object with all the methods and properties of the original object. This means that we don't have to mock each method and property individually. -->
|
|
67
|
-
|
|
68
|
-
### Step 1: Encapsulate interactions with third-party dependencies
|
|
69
|
-
Implicit dependencies (dependencies introduced by importing a module) make it difficult to reason about the code and to test it. To avoid this problem, we'll create a new class that encapsulates interactions with the third-party library. We'll see how this approach lets us mock dependencies more easily.
|
|
70
|
-
|
|
71
|
-
```ts title="Encapsulating the Linking module in a new class responsible for opening URLs"
|
|
72
|
-
import {Linking} from 'react-native';
|
|
73
|
-
|
|
74
|
-
export class UrlOpener {
|
|
75
|
-
public async openUrl(url: string) {
|
|
76
|
-
if (await Linking.canOpenURL(url)) {
|
|
77
|
-
await Linking.openURL(url);
|
|
78
|
-
} else {
|
|
79
|
-
throw new Error(`Can't open URL: ${url}`);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
:::tip On decoupling third party dependencies
|
|
86
|
-
"Avoid littering direct calls to library classes in your code. You might think that you'll never change them, but that can become a self-fulfilling prophecy."
|
|
87
|
-
|
|
88
|
-
— [Working Effectively with Legacy Code](https://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052)
|
|
89
|
-
:::
|
|
90
|
-
|
|
91
|
-
### Step 2: Convert dependencies to ES6 classes
|
|
92
|
-
We'll convert the `Logger` and `Foo` classes to ES6 classes:
|
|
93
|
-
|
|
94
|
-
```ts title="Logger.ts"
|
|
95
|
-
export class Logger {
|
|
96
|
-
public log(message: string) {
|
|
97
|
-
console.log(message);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
public warn(message: string) {
|
|
101
|
-
console.warn(message);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
```ts title="Foo.ts"
|
|
107
|
-
export class Foo {
|
|
108
|
-
public doSomething() {
|
|
109
|
-
console.log('doing something...');
|
|
110
|
-
setTimeout(() => {
|
|
111
|
-
console.log('done!');
|
|
112
|
-
}, 1000);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### Step 3: Mock dependencies using jest-mock-extended
|
|
118
|
-
When we mock a dependency using `jest-mock-extended`, we get a mock object that has all the methods and properties of the original object. This means that we don't have to mock each method and property individually. And, because we eliminated the implicit dependency on the `Linking` module, we can use this approach to mock it as well.
|
|
119
|
-
|
|
120
|
-
```ts showLineNumbers
|
|
121
|
-
import {mock} from 'jest-mock-extended';
|
|
122
|
-
import {Logger} from './Logger';
|
|
123
|
-
import {Foo} from './Foo';
|
|
124
|
-
|
|
125
|
-
describe('Example', () => {
|
|
126
|
-
let logger: Logger;
|
|
127
|
-
let foo: Foo;
|
|
128
|
-
let urlOpener: UrlOpener;
|
|
129
|
-
let uut: Example;
|
|
130
|
-
|
|
131
|
-
beforeEach(() => {
|
|
132
|
-
logger = mock<Logger>();
|
|
133
|
-
foo = mock<Foo>();
|
|
134
|
-
urlOpener = mock<UrlOpener>();
|
|
135
|
-
uut = new Example(logger, foo, urlOpener);
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
## Wrapping up
|
|
141
|
-
While we didn't use any API from `Obsidian` in this refactor, this change was made possible due to how Obsidian influences the design of our code. Obsidian makes it easy to introduce classes to each other by passing them explicitly in through the constructor. This approach encourages us to split our code into smaller classes that are easier to test.
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
// Note: type annotations allow type checking and IDEs autocompletion
|
|
3
|
-
|
|
4
|
-
const lightCodeTheme = require('prism-react-renderer/themes/github');
|
|
5
|
-
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
|
|
6
|
-
|
|
7
|
-
/** @type {import('@docusaurus/types').Config} */
|
|
8
|
-
const config = {
|
|
9
|
-
title: 'Obsidian',
|
|
10
|
-
tagline: 'Dependency injection framework for React and React Native applications',
|
|
11
|
-
url: 'https://wix-incubator.github.io',
|
|
12
|
-
baseUrl: '/obsidian/',
|
|
13
|
-
onBrokenLinks: 'throw',
|
|
14
|
-
onBrokenMarkdownLinks: 'warn',
|
|
15
|
-
favicon: 'img/favicon.ico',
|
|
16
|
-
|
|
17
|
-
// GitHub pages deployment config.
|
|
18
|
-
// If you aren't using GitHub pages, you don't need these.
|
|
19
|
-
organizationName: 'Wix.com', // Usually your GitHub org/user name.
|
|
20
|
-
projectName: 'obsidian', // Usually your repo name.
|
|
21
|
-
|
|
22
|
-
// Even if you don't use internalization, you can use this field to set useful
|
|
23
|
-
// metadata like html lang. For example, if your site is Chinese, you may want
|
|
24
|
-
// to replace "en" with "zh-Hans".
|
|
25
|
-
i18n: {
|
|
26
|
-
defaultLocale: 'en',
|
|
27
|
-
locales: ['en'],
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
presets: [
|
|
31
|
-
[
|
|
32
|
-
'classic',
|
|
33
|
-
/** @type {import('@docusaurus/preset-classic').Options} */
|
|
34
|
-
({
|
|
35
|
-
docs: {
|
|
36
|
-
sidebarPath: require.resolve('./sidebars.js'),
|
|
37
|
-
// Please change this to your repo.
|
|
38
|
-
// Remove this to remove the "edit this page" links.
|
|
39
|
-
editUrl:
|
|
40
|
-
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
|
41
|
-
},
|
|
42
|
-
blog: {
|
|
43
|
-
showReadingTime: true,
|
|
44
|
-
// Please change this to your repo.
|
|
45
|
-
// Remove this to remove the "edit this page" links.
|
|
46
|
-
editUrl:
|
|
47
|
-
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
|
48
|
-
},
|
|
49
|
-
theme: {
|
|
50
|
-
customCss: require.resolve('./src/css/custom.css'),
|
|
51
|
-
},
|
|
52
|
-
}),
|
|
53
|
-
],
|
|
54
|
-
],
|
|
55
|
-
|
|
56
|
-
themeConfig:
|
|
57
|
-
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
|
58
|
-
({
|
|
59
|
-
navbar: {
|
|
60
|
-
title: 'Obsidian',
|
|
61
|
-
logo: {
|
|
62
|
-
alt: 'Obsidian Logo',
|
|
63
|
-
src: 'img/logo.svg',
|
|
64
|
-
},
|
|
65
|
-
items: [
|
|
66
|
-
{
|
|
67
|
-
type: 'docSidebar',
|
|
68
|
-
sidebarId: 'docs2',
|
|
69
|
-
position: 'left',
|
|
70
|
-
label: 'Documentation',
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
type: 'docSidebar',
|
|
74
|
-
sidebarId: 'guides',
|
|
75
|
-
position: 'left',
|
|
76
|
-
label: 'Guides',
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
position: 'left',
|
|
80
|
-
label: 'Playground',
|
|
81
|
-
to: '/playground/',
|
|
82
|
-
},
|
|
83
|
-
// {to: '/blog', label: 'Blog', position: 'left'},
|
|
84
|
-
{
|
|
85
|
-
href: 'https://github.com/wix-incubator/obsidian',
|
|
86
|
-
label: 'GitHub',
|
|
87
|
-
position: 'right',
|
|
88
|
-
},
|
|
89
|
-
],
|
|
90
|
-
},
|
|
91
|
-
footer: {
|
|
92
|
-
style: 'dark',
|
|
93
|
-
links: [
|
|
94
|
-
{
|
|
95
|
-
title: 'Docs',
|
|
96
|
-
items: [
|
|
97
|
-
{
|
|
98
|
-
label: 'Tutorial',
|
|
99
|
-
to: '/docs/documentation#the-2-steps-tutorial-for-injecting-dependencies-with-obsidian',
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
label: 'Installation',
|
|
103
|
-
to: '/docs/documentation/installation',
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
label: 'API',
|
|
107
|
-
to: '/docs/category/usage',
|
|
108
|
-
}
|
|
109
|
-
],
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
title: 'Community',
|
|
113
|
-
items: [
|
|
114
|
-
// {
|
|
115
|
-
// label: 'Stack Overflow',
|
|
116
|
-
// href: 'https://stackoverflow.com/questions/tagged/docusaurus',
|
|
117
|
-
// },
|
|
118
|
-
{
|
|
119
|
-
label: 'Discord',
|
|
120
|
-
href: 'https://discord.gg/2g5vhGQN',
|
|
121
|
-
},
|
|
122
|
-
// {
|
|
123
|
-
// label: 'Twitter',
|
|
124
|
-
// href: 'https://twitter.com/docusaurus',
|
|
125
|
-
// },
|
|
126
|
-
],
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
title: 'More',
|
|
130
|
-
items: [
|
|
131
|
-
// {
|
|
132
|
-
// label: 'Blog',
|
|
133
|
-
// to: '/blog',
|
|
134
|
-
// },
|
|
135
|
-
{
|
|
136
|
-
label: 'GitHub',
|
|
137
|
-
href: 'https://github.com/wix-incubator/obsidian',
|
|
138
|
-
},
|
|
139
|
-
],
|
|
140
|
-
},
|
|
141
|
-
],
|
|
142
|
-
copyright: `Copyright © ${new Date().getFullYear()} Wix.com. Built with Docusaurus.`,
|
|
143
|
-
},
|
|
144
|
-
prism: {
|
|
145
|
-
theme: lightCodeTheme,
|
|
146
|
-
darkTheme: darkCodeTheme,
|
|
147
|
-
},
|
|
148
|
-
}),
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
module.exports = config;
|