mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 09:07:29 +02:00
Fix examples script for Windows
This commit is contained in:
parent
2a196cb1bc
commit
34ad3fac8b
1 changed files with 3 additions and 3 deletions
|
@ -53,7 +53,7 @@ if (feature === "translations") {
|
||||||
if (path.basename(file) === "crowdin.yaml") {
|
if (path.basename(file) === "crowdin.yaml") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const filePath = file.split(folder)[1];
|
const filePath = path.resolve(file).split(path.resolve(folder))[1];
|
||||||
try {
|
try {
|
||||||
fs.copySync(file, CWD + filePath, {
|
fs.copySync(file, CWD + filePath, {
|
||||||
overwrite: false,
|
overwrite: false,
|
||||||
|
@ -84,7 +84,7 @@ if (feature === "translations") {
|
||||||
if (fs.lstatSync(file).isDirectory()) {
|
if (fs.lstatSync(file).isDirectory()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const filePath = file.split(folder)[1];
|
const filePath = path.resolve(file).split(path.resolve(folder))[1];
|
||||||
try {
|
try {
|
||||||
fs.copySync(file, CWD + filePath, {
|
fs.copySync(file, CWD + filePath, {
|
||||||
overwrite: false,
|
overwrite: false,
|
||||||
|
@ -181,7 +181,7 @@ if (feature === "translations") {
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const filePath = file.split(folder)[1];
|
const filePath = path.resolve(file).split(path.resolve(folder))[1];
|
||||||
try {
|
try {
|
||||||
fs.copySync(file, CWD + filePath, {
|
fs.copySync(file, CWD + filePath, {
|
||||||
overwrite: false,
|
overwrite: false,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue