mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-01 07:49:43 +02:00
refactor: ensure lodash is default-imported (#6716)
This commit is contained in:
parent
47c9a37c5f
commit
ea6ceaa371
44 changed files with 239 additions and 221 deletions
|
@ -8,7 +8,7 @@
|
|||
import path from 'path';
|
||||
import {isMatch} from 'picomatch';
|
||||
import commander from 'commander';
|
||||
import {kebabCase, orderBy} from 'lodash';
|
||||
import _ from 'lodash';
|
||||
|
||||
import fs from 'fs-extra';
|
||||
import pluginContentDocs from '../index';
|
||||
|
@ -89,7 +89,7 @@ Entries created:
|
|||
|
||||
checkVersionMetadataPropCreated: (version: LoadedVersion) => {
|
||||
const versionMetadataProp = getCreatedDataByPrefix(
|
||||
`version-${kebabCase(version.versionName)}-metadata-prop`,
|
||||
`version-${_.kebabCase(version.versionName)}-metadata-prop`,
|
||||
);
|
||||
expect(versionMetadataProp.docsSidebars).toEqual(toSidebarsProp(version));
|
||||
},
|
||||
|
@ -815,7 +815,7 @@ describe('site with custom sidebar items generator', () => {
|
|||
): SidebarItemsGeneratorOptionArgs {
|
||||
return {
|
||||
...arg,
|
||||
docs: orderBy(arg.docs, 'id'),
|
||||
docs: _.orderBy(arg.docs, 'id'),
|
||||
version: {
|
||||
...arg.version,
|
||||
contentPath: path.relative(siteDir, arg.version.contentPath),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue