react-obsidian 1.1.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/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/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/index.ts +1 -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 -105
- package/.vscode/settings.json +0 -6
- 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
package/dist/src/index.d.ts
CHANGED
|
@@ -21,4 +21,5 @@ export { MediatorObservable } from './observable/mediator/MediatorObservable';
|
|
|
21
21
|
export { OnNext, Unsubscribe } from './observable/types';
|
|
22
22
|
export { Model } from './model/Model';
|
|
23
23
|
export { testKit } from '../testkit';
|
|
24
|
+
export { mockModel, mockGraphs } from '../testkit/index';
|
|
24
25
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,iBAAiB,IAAI,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvF,eAAO,MAAM,QAAQ,WAAkB,CAAC;AAExC,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEnF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,iBAAiB,IAAI,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvF,eAAO,MAAM,QAAQ,WAAkB,CAAC;AAExC,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEnF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.testKit = exports.Model = exports.MediatorObservable = exports.Observable = exports.useObservers = exports.useObserver = exports.injectHookWithArguments = exports.injectHook = exports.injectComponent = exports.Obsidian = exports.GraphMiddleware = exports.LifecycleBound = exports.LateInject = exports.Inject = exports.Injectable = exports.Provides = exports.ObjectGraph = exports.Singleton = exports.Graph = void 0;
|
|
20
|
+
exports.mockGraphs = exports.mockModel = exports.testKit = exports.Model = exports.MediatorObservable = exports.Observable = exports.useObservers = exports.useObserver = exports.injectHookWithArguments = exports.injectHook = exports.injectComponent = exports.Obsidian = exports.GraphMiddleware = exports.LifecycleBound = exports.LateInject = exports.Inject = exports.Injectable = exports.Provides = exports.ObjectGraph = exports.Singleton = exports.Graph = void 0;
|
|
21
21
|
const Obsidian_1 = __importDefault(require("./Obsidian"));
|
|
22
22
|
__exportStar(require("./types"), exports);
|
|
23
23
|
var Graph_1 = require("./decorators/Graph");
|
|
@@ -56,4 +56,7 @@ var Model_1 = require("./model/Model");
|
|
|
56
56
|
Object.defineProperty(exports, "Model", { enumerable: true, get: function () { return Model_1.Model; } });
|
|
57
57
|
var testkit_1 = require("../testkit");
|
|
58
58
|
Object.defineProperty(exports, "testKit", { enumerable: true, get: function () { return testkit_1.testKit; } });
|
|
59
|
+
var index_1 = require("../testkit/index");
|
|
60
|
+
Object.defineProperty(exports, "mockModel", { enumerable: true, get: function () { return index_1.mockModel; } });
|
|
61
|
+
Object.defineProperty(exports, "mockGraphs", { enumerable: true, get: function () { return index_1.mockGraphs; } });
|
|
59
62
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,0DAAmC;AAEnC,0CAAwB;AAExB,4CAA2C;AAAlC,8FAAA,KAAK,OAAA;AACd,oDAAmD;AAA1C,sGAAA,SAAS,OAAA;AAClB,mDAAkD;AAAzC,0GAAA,WAAW,OAAA;AAEpB,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,6DAA4D;AAAnD,wGAAA,UAAU,OAAA;AACnB,qDAAoD;AAA3C,gGAAA,MAAM,OAAA;AACf,6DAA4D;AAAnD,wGAAA,UAAU,OAAA;AACnB,8DAA6D;AAApD,gHAAA,cAAc,OAAA;AACvB,oEAAmE;AAA1D,kHAAA,eAAe,OAAA;AAGX,QAAA,QAAQ,GAAG,IAAI,kBAAS,EAAE,CAAC;AAExC,0EAAyE;AAAhE,kHAAA,eAAe,OAAA;AACxB,2DAAmF;AAA1E,wGAAA,UAAU,OAAA;AAAE,qHAAA,uBAAuB,OAAA;AAE5C,wDAAuD;AAA9C,0GAAA,WAAW,OAAA;AACpB,0DAAyD;AAAhD,4GAAA,YAAY,OAAA;AACrB,sDAAqD;AAA5C,wGAAA,UAAU,OAAA;AACnB,+EAA8E;AAArE,wHAAA,kBAAkB,OAAA;AAG3B,uCAAsC;AAA7B,8FAAA,KAAK,OAAA;AAEd,sCAAqC;AAA5B,kGAAA,OAAO,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,0DAAmC;AAEnC,0CAAwB;AAExB,4CAA2C;AAAlC,8FAAA,KAAK,OAAA;AACd,oDAAmD;AAA1C,sGAAA,SAAS,OAAA;AAClB,mDAAkD;AAAzC,0GAAA,WAAW,OAAA;AAEpB,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,6DAA4D;AAAnD,wGAAA,UAAU,OAAA;AACnB,qDAAoD;AAA3C,gGAAA,MAAM,OAAA;AACf,6DAA4D;AAAnD,wGAAA,UAAU,OAAA;AACnB,8DAA6D;AAApD,gHAAA,cAAc,OAAA;AACvB,oEAAmE;AAA1D,kHAAA,eAAe,OAAA;AAGX,QAAA,QAAQ,GAAG,IAAI,kBAAS,EAAE,CAAC;AAExC,0EAAyE;AAAhE,kHAAA,eAAe,OAAA;AACxB,2DAAmF;AAA1E,wGAAA,UAAU,OAAA;AAAE,qHAAA,uBAAuB,OAAA;AAE5C,wDAAuD;AAA9C,0GAAA,WAAW,OAAA;AACpB,0DAAyD;AAAhD,4GAAA,YAAY,OAAA;AACrB,sDAAqD;AAA5C,wGAAA,UAAU,OAAA;AACnB,+EAA8E;AAArE,wHAAA,kBAAkB,OAAA;AAG3B,uCAAsC;AAA7B,8FAAA,KAAK,OAAA;AAEd,sCAAqC;AAA5B,kGAAA,OAAO,OAAA;AAChB,0CAAyD;AAAhD,kGAAA,SAAS,OAAA;AAAE,mGAAA,UAAU,OAAA"}
|
package/dist/testkit/index.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { ObjectGraph } from '../src/graph/ObjectGraph';
|
|
2
2
|
import { Constructable } from '../src/types';
|
|
3
|
+
import { mockGraphs } from './mockGraphs';
|
|
3
4
|
declare class TestKit {
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated testKit.mockGraphs is deprecated, use mockGraphs instead
|
|
7
|
+
*/
|
|
4
8
|
mockGraphs(graphNameToGraph: Record<string, Constructable<ObjectGraph> | ((props: any) => ObjectGraph)>): void;
|
|
5
9
|
}
|
|
10
|
+
export { mockModel } from './mockModel';
|
|
11
|
+
export { mockGraphs };
|
|
6
12
|
export declare const testKit: TestKit;
|
|
7
|
-
export {};
|
|
8
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../testkit/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../testkit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,cAAM,OAAO;IACX;;OAEG;IACI,UAAU,CAAC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,WAAW,CAAC,CAAC;CAK/G;AAED,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,eAAO,MAAM,OAAO,SAAgB,CAAC"}
|
package/dist/testkit/index.js
CHANGED
|
@@ -1,25 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.testKit = void 0;
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const GraphRegistry_1 = __importDefault(require("../src/graph/registry/GraphRegistry"));
|
|
3
|
+
exports.testKit = exports.mockGraphs = exports.mockModel = void 0;
|
|
4
|
+
const mockGraphs_1 = require("./mockGraphs");
|
|
5
|
+
Object.defineProperty(exports, "mockGraphs", { enumerable: true, get: function () { return mockGraphs_1.mockGraphs; } });
|
|
10
6
|
class TestKit {
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated testKit.mockGraphs is deprecated, use mockGraphs instead
|
|
9
|
+
*/
|
|
11
10
|
mockGraphs(graphNameToGraph) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const GraphOrGenerator = graphNameToGraph[Graph.name];
|
|
16
|
-
return (0, ObjectGraph_1.isGraph)(GraphOrGenerator) ? new GraphOrGenerator(props) : GraphOrGenerator(props);
|
|
17
|
-
}
|
|
18
|
-
return resolveChain.proceed(Graph, props);
|
|
19
|
-
}
|
|
20
|
-
}();
|
|
21
|
-
GraphRegistry_1.default.addGraphMiddleware(graphMiddleware);
|
|
11
|
+
// eslint-disable-next-line no-console
|
|
12
|
+
console.warn('testKit.mockGraphs is deprecated, use mockGraphs instead');
|
|
13
|
+
return (0, mockGraphs_1.mockGraphs)(graphNameToGraph);
|
|
22
14
|
}
|
|
23
15
|
}
|
|
16
|
+
var mockModel_1 = require("./mockModel");
|
|
17
|
+
Object.defineProperty(exports, "mockModel", { enumerable: true, get: function () { return mockModel_1.mockModel; } });
|
|
24
18
|
exports.testKit = new TestKit();
|
|
25
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../testkit/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../testkit/index.ts"],"names":[],"mappings":";;;AAEA,6CAA0C;AAcjC,2FAdA,uBAAU,OAcA;AAZnB,MAAM,OAAO;IACX;;OAEG;IACI,UAAU,CAAC,gBAA4F;QAC5G,sCAAsC;QACtC,OAAO,CAAC,IAAI,CAAC,0DAA0D,CAAC,CAAC;QACzE,OAAO,IAAA,uBAAU,EAAC,gBAAgB,CAAC,CAAC;IACtC,CAAC;CACF;AAED,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAGL,QAAA,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ObjectGraph } from '../src/graph/ObjectGraph';
|
|
2
|
+
import { Constructable } from '../src/types';
|
|
3
|
+
export declare function mockGraphs(graphNameToGraph: Record<string, Constructable<ObjectGraph> | ((props: any) => ObjectGraph)>): void;
|
|
4
|
+
//# sourceMappingURL=mockGraphs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mockGraphs.d.ts","sourceRoot":"","sources":["../../testkit/mockGraphs.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,wBAAgB,UAAU,CACxB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,WAAW,CAAC,CAAC,QAY7F"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.mockGraphs = void 0;
|
|
7
|
+
const ObjectGraph_1 = require("../src/graph/ObjectGraph");
|
|
8
|
+
const GraphMiddleware_1 = require("../src/graph/registry/GraphMiddleware");
|
|
9
|
+
const GraphRegistry_1 = __importDefault(require("../src/graph/registry/GraphRegistry"));
|
|
10
|
+
function mockGraphs(graphNameToGraph) {
|
|
11
|
+
const graphMiddleware = new class extends GraphMiddleware_1.GraphMiddleware {
|
|
12
|
+
resolve(resolveChain, Graph, props) {
|
|
13
|
+
if (graphNameToGraph[Graph.name]) {
|
|
14
|
+
const GraphOrGenerator = graphNameToGraph[Graph.name];
|
|
15
|
+
return (0, ObjectGraph_1.isGraph)(GraphOrGenerator) ? new GraphOrGenerator(props) : GraphOrGenerator(props);
|
|
16
|
+
}
|
|
17
|
+
return resolveChain.proceed(Graph, props);
|
|
18
|
+
}
|
|
19
|
+
}();
|
|
20
|
+
GraphRegistry_1.default.addGraphMiddleware(graphMiddleware);
|
|
21
|
+
}
|
|
22
|
+
exports.mockGraphs = mockGraphs;
|
|
23
|
+
//# sourceMappingURL=mockGraphs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mockGraphs.js","sourceRoot":"","sources":["../../testkit/mockGraphs.ts"],"names":[],"mappings":";;;;;;AACA,0DAAgE;AAChE,2EAAwE;AAExE,wFAAgE;AAEhE,SAAgB,UAAU,CACxB,gBAA4F;IAE5F,MAAM,eAAe,GAAG,IAAI,KAAM,SAAQ,iCAAe;QACvD,OAAO,CAAQ,YAA+B,EAAE,KAAiC,EAAE,KAAa;YAC9F,IAAI,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;gBAChC,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBACtD,OAAO,IAAA,qBAAO,EAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;aAC1F;YACD,OAAO,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC5C,CAAC;KACF,EAAE,CAAC;IACJ,uBAAa,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC;AACpD,CAAC;AAbD,gCAaC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mockModel.d.ts","sourceRoot":"","sources":["../../testkit/mockModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,wBAAgB,SAAS,CAAC,CAAC,SAAS,KAAK,EAAE,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,CAO3E"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mockModel = void 0;
|
|
4
|
+
const Model_1 = require("../src/model/Model");
|
|
5
|
+
function mockModel(mock) {
|
|
6
|
+
return new class extends Model_1.Model {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
Object.assign(this, mock);
|
|
10
|
+
}
|
|
11
|
+
}();
|
|
12
|
+
}
|
|
13
|
+
exports.mockModel = mockModel;
|
|
14
|
+
//# sourceMappingURL=mockModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mockModel.js","sourceRoot":"","sources":["../../testkit/mockModel.ts"],"names":[],"mappings":";;;AAAA,8CAA2C;AAE3C,SAAgB,SAAS,CAAwC,IAAO;IACtE,OAAO,IAAI,KAAM,SAAQ,aAAK;QAC5B;YACE,KAAK,EAAE,CAAC;YACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC5B,CAAC;KACF,EAAO,CAAC;AACX,CAAC;AAPD,8BAOC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/testkit/index.ts
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isGraph, ObjectGraph } from '../src/graph/ObjectGraph';
|
|
3
|
-
import { GraphMiddleware } from '../src/graph/registry/GraphMiddleware';
|
|
1
|
+
import { ObjectGraph } from '../src/graph/ObjectGraph';
|
|
4
2
|
import { Constructable } from '../src/types';
|
|
5
|
-
import
|
|
3
|
+
import { mockGraphs } from './mockGraphs';
|
|
6
4
|
|
|
7
5
|
class TestKit {
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated testKit.mockGraphs is deprecated, use mockGraphs instead
|
|
8
|
+
*/
|
|
8
9
|
public mockGraphs(graphNameToGraph: Record<string, Constructable<ObjectGraph> | ((props: any) => ObjectGraph)>) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const GraphOrGenerator = graphNameToGraph[Graph.name];
|
|
13
|
-
return isGraph(GraphOrGenerator) ? new GraphOrGenerator(props) : GraphOrGenerator(props);
|
|
14
|
-
}
|
|
15
|
-
return resolveChain.proceed(Graph, props);
|
|
16
|
-
}
|
|
17
|
-
}();
|
|
18
|
-
graphRegistry.addGraphMiddleware(graphMiddleware);
|
|
10
|
+
// eslint-disable-next-line no-console
|
|
11
|
+
console.warn('testKit.mockGraphs is deprecated, use mockGraphs instead');
|
|
12
|
+
return mockGraphs(graphNameToGraph);
|
|
19
13
|
}
|
|
20
14
|
}
|
|
21
15
|
|
|
16
|
+
export { mockModel } from './mockModel';
|
|
17
|
+
export { mockGraphs };
|
|
18
|
+
|
|
22
19
|
export const testKit = new TestKit();
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { GraphResolveChain } from '../src/graph/registry/GraphResolveChain';
|
|
2
|
+
import { isGraph, ObjectGraph } from '../src/graph/ObjectGraph';
|
|
3
|
+
import { GraphMiddleware } from '../src/graph/registry/GraphMiddleware';
|
|
4
|
+
import { Constructable } from '../src/types';
|
|
5
|
+
import graphRegistry from '../src/graph/registry/GraphRegistry';
|
|
6
|
+
|
|
7
|
+
export function mockGraphs(
|
|
8
|
+
graphNameToGraph: Record<string, Constructable<ObjectGraph> | ((props: any) => ObjectGraph)>,
|
|
9
|
+
) {
|
|
10
|
+
const graphMiddleware = new class extends GraphMiddleware {
|
|
11
|
+
resolve<Props>(resolveChain: GraphResolveChain, Graph: Constructable<ObjectGraph>, props?: Props) {
|
|
12
|
+
if (graphNameToGraph[Graph.name]) {
|
|
13
|
+
const GraphOrGenerator = graphNameToGraph[Graph.name];
|
|
14
|
+
return isGraph(GraphOrGenerator) ? new GraphOrGenerator(props) : GraphOrGenerator(props);
|
|
15
|
+
}
|
|
16
|
+
return resolveChain.proceed(Graph, props);
|
|
17
|
+
}
|
|
18
|
+
}();
|
|
19
|
+
graphRegistry.addGraphMiddleware(graphMiddleware);
|
|
20
|
+
}
|
package/.buildkite/pipeline.yml
DELETED
package/.eslintignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
dist/*
|
package/.eslintrc.json
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"env": {
|
|
4
|
-
"es2021": true,
|
|
5
|
-
"jest": true
|
|
6
|
-
},
|
|
7
|
-
"ignorePatterns": ["**/*.config.js"],
|
|
8
|
-
"extends": [
|
|
9
|
-
"airbnb-base",
|
|
10
|
-
"airbnb-typescript",
|
|
11
|
-
"plugin:react/recommended",
|
|
12
|
-
"plugin:@typescript-eslint/recommended",
|
|
13
|
-
"plugin:import/typescript"
|
|
14
|
-
],
|
|
15
|
-
"parser": "@typescript-eslint/parser",
|
|
16
|
-
"parserOptions": {
|
|
17
|
-
"project": "./tsconfig.json",
|
|
18
|
-
"ecmaVersion": 2021,
|
|
19
|
-
"sourceType": "module",
|
|
20
|
-
"ecmaFeatures": {
|
|
21
|
-
"jsx": true
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"plugins": [
|
|
25
|
-
"react",
|
|
26
|
-
"@typescript-eslint",
|
|
27
|
-
"import-newlines",
|
|
28
|
-
"unused-imports"
|
|
29
|
-
],
|
|
30
|
-
"rules": {
|
|
31
|
-
"max-len": ["error", {"code": 115}],
|
|
32
|
-
"lines-between-class-members": ["error", "always", {"exceptAfterSingleLine": true}],
|
|
33
|
-
"import/extensions": "off",
|
|
34
|
-
"@typescript-eslint/no-non-null-assertion": "off",
|
|
35
|
-
"no-useless-constructor": "off",
|
|
36
|
-
"@typescript-eslint/member-delimiter-style": "error",
|
|
37
|
-
"import/no-unresolved": "off",
|
|
38
|
-
"class-methods-use-this": "off",
|
|
39
|
-
"react/jsx-filename-extension": ["error", {"extensions": [".js", ".ts", ".jsx", ".tsx"]}],
|
|
40
|
-
"react/jsx-props-no-spreading": "off",
|
|
41
|
-
"no-use-before-define": "off",
|
|
42
|
-
"@typescript-eslint/no-use-before-define": ["off"],
|
|
43
|
-
"no-restricted-syntax": "off",
|
|
44
|
-
"import/no-named-as-default": "off",
|
|
45
|
-
"@typescript-eslint/ban-types": ["off"],
|
|
46
|
-
"import/no-extraneous-dependencies": ["error", {"devDependencies": true}],
|
|
47
|
-
"max-classes-per-file": ["off"],
|
|
48
|
-
"curly": ["error", "multi-line"],
|
|
49
|
-
"semi": ["error", "always"],
|
|
50
|
-
"comma-dangle": ["error", "always-multiline"],
|
|
51
|
-
"function-call-argument-newline": ["error", "consistent"],
|
|
52
|
-
"function-paren-newline": ["error", "multiline-arguments"],
|
|
53
|
-
"object-curly-newline": [
|
|
54
|
-
"error",
|
|
55
|
-
{
|
|
56
|
-
"ObjectExpression": {
|
|
57
|
-
"multiline": true,
|
|
58
|
-
"consistent": true
|
|
59
|
-
},
|
|
60
|
-
"ObjectPattern": {
|
|
61
|
-
"multiline": true,
|
|
62
|
-
"consistent": true
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
],
|
|
66
|
-
"no-whitespace-before-property": "error",
|
|
67
|
-
"import-newlines/enforce": [
|
|
68
|
-
"error",
|
|
69
|
-
{
|
|
70
|
-
"items": 3,
|
|
71
|
-
"max-len": 115,
|
|
72
|
-
"semi": false
|
|
73
|
-
}
|
|
74
|
-
],
|
|
75
|
-
"react/display-name": "off",
|
|
76
|
-
"no-plusplus": "off",
|
|
77
|
-
"no-trailing-spaces": "error",
|
|
78
|
-
"no-shadow": "off",
|
|
79
|
-
"@typescript-eslint/no-shadow": ["error", {"allow": ["Graph"]}],
|
|
80
|
-
"react/button-has-type": "off",
|
|
81
|
-
"react/jsx-one-expression-per-line": ["off"],
|
|
82
|
-
"arrow-body-style": ["off"],
|
|
83
|
-
"@typescript-eslint/quotes": ["error", "single", {"avoidEscape": true, "allowTemplateLiterals": true}],
|
|
84
|
-
"@typescript-eslint/lines-between-class-members": "off",
|
|
85
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
86
|
-
"import/prefer-default-export": "off",
|
|
87
|
-
"@typescript-eslint/no-unused-vars": "off",
|
|
88
|
-
"unused-imports/no-unused-imports": "error",
|
|
89
|
-
"unused-imports/no-unused-vars": [
|
|
90
|
-
"error",
|
|
91
|
-
{ "vars": "all", "varsIgnorePattern": "^_", "args": "after-used", "argsIgnorePattern": "^_" }
|
|
92
|
-
],
|
|
93
|
-
"@typescript-eslint/ban-ts-comment": "off"
|
|
94
|
-
},
|
|
95
|
-
"settings": {
|
|
96
|
-
"import/resolver": {
|
|
97
|
-
"node": {
|
|
98
|
-
"extensions": [".js", ".jsx", ".ts", ".tsx"]
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
"react": {
|
|
102
|
-
"version": "detect"
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
package/.vscode/settings.json
DELETED
package/babel.config.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
presets: [
|
|
3
|
-
['@babel/preset-env', { targets: { node: 'current' }}],
|
|
4
|
-
['@babel/preset-typescript', {'onlyRemoveTypeImports': true}],
|
|
5
|
-
'@babel/preset-react',
|
|
6
|
-
],
|
|
7
|
-
plugins: [
|
|
8
|
-
`${__dirname}/dist/transformers/babel-plugin-obsidian`,
|
|
9
|
-
['@babel/plugin-proposal-decorators', { legacy: true }],
|
|
10
|
-
'@babel/plugin-transform-class-properties',
|
|
11
|
-
'babel-plugin-parameter-decorator'
|
|
12
|
-
],
|
|
13
|
-
};
|
package/documentation/README.md
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# Website
|
|
2
|
-
|
|
3
|
-
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
|
|
4
|
-
|
|
5
|
-
### Installation
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
$ yarn
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
### Local Development
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
$ yarn start
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
|
18
|
-
|
|
19
|
-
### Build
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
$ yarn build
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
|
26
|
-
|
|
27
|
-
### Deployment
|
|
28
|
-
|
|
29
|
-
Using SSH:
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
$ USE_SSH=true yarn deploy
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Not using SSH:
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
$ GIT_USER=<Your GitHub username> yarn deploy
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
slug: first-blog-post
|
|
3
|
-
title: First Blog Post
|
|
4
|
-
authors:
|
|
5
|
-
name: Gao Wei
|
|
6
|
-
title: Docusaurus Core Team
|
|
7
|
-
url: https://github.com/wgao19
|
|
8
|
-
image_url: https://github.com/wgao19.png
|
|
9
|
-
tags: [hola, docusaurus]
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
slug: long-blog-post
|
|
3
|
-
title: Long Blog Post
|
|
4
|
-
authors: endi
|
|
5
|
-
tags: [hello, docusaurus]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
This is the summary of a very long blog post,
|
|
9
|
-
|
|
10
|
-
Use a `<!--` `truncate` `-->` comment to limit blog post size in the list view.
|
|
11
|
-
|
|
12
|
-
<!--truncate-->
|
|
13
|
-
|
|
14
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
15
|
-
|
|
16
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
17
|
-
|
|
18
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
19
|
-
|
|
20
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
21
|
-
|
|
22
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
23
|
-
|
|
24
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
25
|
-
|
|
26
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
27
|
-
|
|
28
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
29
|
-
|
|
30
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
31
|
-
|
|
32
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
33
|
-
|
|
34
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
35
|
-
|
|
36
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
37
|
-
|
|
38
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
39
|
-
|
|
40
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
41
|
-
|
|
42
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
43
|
-
|
|
44
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
slug: mdx-blog-post
|
|
3
|
-
title: MDX Blog Post
|
|
4
|
-
authors: [slorber]
|
|
5
|
-
tags: [docusaurus]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).
|
|
9
|
-
|
|
10
|
-
:::tip
|
|
11
|
-
|
|
12
|
-
Use the power of React to create interactive blog posts.
|
|
13
|
-
|
|
14
|
-
```js
|
|
15
|
-
<button onClick={() => alert('button clicked!')}>Click me!</button>
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
<button onClick={() => alert('button clicked!')}>Click me!</button>
|
|
19
|
-
|
|
20
|
-
:::
|
|
Binary file
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
slug: welcome
|
|
3
|
-
title: Welcome
|
|
4
|
-
authors: [slorber, yangshun]
|
|
5
|
-
tags: [facebook, hello, docusaurus]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).
|
|
9
|
-
|
|
10
|
-
Simply add Markdown files (or folders) to the `blog` directory.
|
|
11
|
-
|
|
12
|
-
Regular blog authors can be added to `authors.yml`.
|
|
13
|
-
|
|
14
|
-
The blog post date can be extracted from filenames, such as:
|
|
15
|
-
|
|
16
|
-
- `2019-05-30-welcome.md`
|
|
17
|
-
- `2019-05-30-welcome/index.md`
|
|
18
|
-
|
|
19
|
-
A blog post folder can be convenient to co-locate blog post images:
|
|
20
|
-
|
|
21
|
-

|
|
22
|
-
|
|
23
|
-
The blog supports tags as well!
|
|
24
|
-
|
|
25
|
-
**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config.
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
endi:
|
|
2
|
-
name: Endilie Yacop Sucipto
|
|
3
|
-
title: Maintainer of Docusaurus
|
|
4
|
-
url: https://github.com/endiliey
|
|
5
|
-
image_url: https://github.com/endiliey.png
|
|
6
|
-
|
|
7
|
-
yangshun:
|
|
8
|
-
name: Yangshun Tay
|
|
9
|
-
title: Front End Engineer @ Facebook
|
|
10
|
-
url: https://github.com/yangshun
|
|
11
|
-
image_url: https://github.com/yangshun.png
|
|
12
|
-
|
|
13
|
-
slorber:
|
|
14
|
-
name: Sébastien Lorber
|
|
15
|
-
title: Docusaurus maintainer
|
|
16
|
-
url: https://sebastienlorber.com
|
|
17
|
-
image_url: https://github.com/slorber.png
|