mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-01 18:32:52 +02:00
fix: replace use of deepmerge with _.merge (#1430)
This commit is contained in:
parent
578c53a936
commit
64fdafbcea
5 changed files with 13 additions and 8 deletions
|
@ -26,7 +26,7 @@ const fs = require('fs-extra');
|
|||
const glob = require('glob');
|
||||
const mkdirp = require('mkdirp');
|
||||
const nodePath = require('path');
|
||||
const deepmerge = require('deepmerge');
|
||||
const _ = require('lodash');
|
||||
|
||||
const readMetadata = require('./server/readMetadata.js');
|
||||
|
||||
|
@ -43,7 +43,8 @@ let customTranslations = {
|
|||
'pages-strings': {},
|
||||
};
|
||||
if (fs.existsSync(`${CWD}/data/custom-translation-strings.json`)) {
|
||||
customTranslations = deepmerge(
|
||||
customTranslations = _.merge(
|
||||
{},
|
||||
JSON.parse(
|
||||
fs.readFileSync(`${CWD}/data/custom-translation-strings.json`, 'utf8'),
|
||||
),
|
||||
|
@ -187,7 +188,8 @@ function execute() {
|
|||
translations['pages-strings'],
|
||||
customTranslations['pages-strings'],
|
||||
);
|
||||
translations['localized-strings'] = deepmerge(
|
||||
translations['localized-strings'] = _.merge(
|
||||
{},
|
||||
translations['localized-strings'],
|
||||
customTranslations['localized-strings'],
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue