-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
temp: add docspace-sdk-js-resource to site
- Loading branch information
1 parent
6f5de5f
commit d5daaf3
Showing
5 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {type Data} from "@onlyoffice/eleventy-types" | ||
import * as g from "@/generations/library-next.ts" | ||
import {Resource} from "@/resources/docspace-sdk-js.ts" | ||
|
||
export function data(): Data { | ||
return g.data(Resource.shared) | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import {Resource as S} from "@onlyoffice/docspace-sdk-js-resource" | ||
import {isBuild} from "@onlyoffice/eleventy-env" | ||
import {Resource as F} from "@onlyoffice/fixture-resource/typedoc.ts" | ||
|
||
export const Resource = r() | ||
|
||
type T = typeof S | typeof F | ||
type I = T["shared"] | ||
|
||
function r(): T { | ||
const T = t() | ||
f(T.shared) | ||
return T | ||
} | ||
|
||
function t(): T { | ||
if (isBuild()) { | ||
return S | ||
} | ||
return F | ||
} | ||
|
||
function f(r: I): void { | ||
const e = r.retrieve(0) | ||
|
||
if (e.type !== "declaration") { | ||
throw new Error(`Root entity must be a declaration: ${e.type}`) | ||
} | ||
|
||
e.declaration.name = "SDK" | ||
} |