mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-07 13:22:26 +02:00
Revert global require change
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
This commit is contained in:
parent
c1beedce3f
commit
03e2174fe7
1 changed files with 3 additions and 3 deletions
|
@ -10,8 +10,6 @@ const path = require('path');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const globby = require('globby');
|
const globby = require('globby');
|
||||||
const {mapValues, pickBy, difference, orderBy} = require('lodash');
|
const {mapValues, pickBy, difference, orderBy} = require('lodash');
|
||||||
// Unsafe import, should we create a package for the translationsExtractor ?
|
|
||||||
const translationsExtractor = require('@docusaurus/core/lib/server/translations/translationsExtractor');
|
|
||||||
|
|
||||||
const CodeDirPaths = [
|
const CodeDirPaths = [
|
||||||
path.join(__dirname, 'lib-next'),
|
path.join(__dirname, 'lib-next'),
|
||||||
|
@ -51,10 +49,12 @@ function logKeys(keys) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function extractThemeCodeMessages() {
|
async function extractThemeCodeMessages() {
|
||||||
|
// Unsafe import, should we create a package for the translationsExtractor ?
|
||||||
const {
|
const {
|
||||||
globSourceCodeFilePaths,
|
globSourceCodeFilePaths,
|
||||||
extractAllSourceCodeFileTranslations,
|
extractAllSourceCodeFileTranslations,
|
||||||
} = translationsExtractor;
|
// eslint-disable-next-line global-require
|
||||||
|
} = require('@docusaurus/core/lib/server/translations/translationsExtractor');
|
||||||
|
|
||||||
const filePaths = (
|
const filePaths = (
|
||||||
await globSourceCodeFilePaths(CodeDirPaths)
|
await globSourceCodeFilePaths(CodeDirPaths)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue