mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-24 12:07:58 +02:00
chore: revert delete loadSetup.ts
This commit is contained in:
parent
2856b328a5
commit
1aff2087b4
1 changed files with 25 additions and 0 deletions
25
packages/docusaurus/src/server/loadSetup.ts
Normal file
25
packages/docusaurus/src/server/loadSetup.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import {load} from './index';
|
||||
import {Props} from '@docusaurus/types';
|
||||
|
||||
// Helper methods to setup dummy/fake projects
|
||||
export const loadSetup = async (name: string): Promise<Props> => {
|
||||
const fixtures = path.join(__dirname, '__tests__', '__fixtures__');
|
||||
const simpleSite = path.join(fixtures, 'simple-site');
|
||||
const customSite = path.join(fixtures, 'custom-site');
|
||||
|
||||
switch (name) {
|
||||
case 'custom':
|
||||
return load(customSite);
|
||||
case 'simple':
|
||||
default:
|
||||
return load(simpleSite);
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue