mirror of
https://github.com/ent/ent.git
synced 2026-05-28 09:49:08 +03:00
doc/graphql: switch default example from templates to extension
This commit is contained in:
committed by
Ariel Mashraki
parent
4f97976d2b
commit
ac9f801259
@@ -1,29 +0,0 @@
|
||||
|
||||
/**
|
||||
* Copyright 2019-present Facebook Inc. All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the Apache 2.0 license found
|
||||
* in the LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
|
||||
import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment';
|
||||
import siteConfig from '@generated/docusaurus.config';
|
||||
|
||||
const prismIncludeLanguages = (PrismObject) => {
|
||||
if (ExecutionEnvironment.canUseDOM) {
|
||||
const {
|
||||
themeConfig: {prism: {additionalLanguages = []} = {}},
|
||||
} = siteConfig;
|
||||
window.Prism = PrismObject;
|
||||
additionalLanguages.forEach((lang) => {
|
||||
require(`prismjs/components/prism-${lang}`); // eslint-disable-line
|
||||
});
|
||||
delete window.Prism;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
export default prismIncludeLanguages;
|
||||
Reference in New Issue
Block a user