publishDev scripts create dirs, so we dont get annoying errors
This commit is contained in:
parent
bd8c1a43a5
commit
91aa46836f
|
@ -1,4 +1,4 @@
|
||||||
const { readdir, stat, copyFile } = require("fs-extra")
|
const { readdir, stat, copyFile, ensureDir } = require("fs-extra")
|
||||||
const { constants } = require("fs")
|
const { constants } = require("fs")
|
||||||
const { join, basename } = require("path")
|
const { join, basename } = require("path")
|
||||||
const serverConfig = require("../../server/config")()
|
const serverConfig = require("../../server/config")()
|
||||||
|
@ -26,6 +26,7 @@ const nodeModules = appName =>
|
||||||
const apps = await readdir(appPackages)
|
const apps = await readdir(appPackages)
|
||||||
|
|
||||||
const copySource = file => async toDir => {
|
const copySource = file => async toDir => {
|
||||||
|
await ensureDir(toDir)
|
||||||
const dest = join(toDir, basename(file))
|
const dest = join(toDir, basename(file))
|
||||||
try {
|
try {
|
||||||
await copyFile(file, dest, constants.COPYFILE_FICLONE)
|
await copyFile(file, dest, constants.COPYFILE_FICLONE)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const { readdir, stat, copyFile } = require("fs-extra")
|
const { readdir, stat, copyFile, ensureDir } = require("fs-extra")
|
||||||
const { constants } = require("fs")
|
const { constants } = require("fs")
|
||||||
const { join, basename } = require("path")
|
const { join, basename } = require("path")
|
||||||
const serverConfig = require("../../server/config")()
|
const serverConfig = require("../../server/config")()
|
||||||
|
@ -62,6 +62,7 @@ const nodeModules = appName =>
|
||||||
const apps = await readdir(appPackages)
|
const apps = await readdir(appPackages)
|
||||||
|
|
||||||
const copySource = file => async toDir => {
|
const copySource = file => async toDir => {
|
||||||
|
await ensureDir(toDir)
|
||||||
const dest = join(toDir, basename(file))
|
const dest = join(toDir, basename(file))
|
||||||
try {
|
try {
|
||||||
await copyFile(file, dest, constants.COPYFILE_FICLONE)
|
await copyFile(file, dest, constants.COPYFILE_FICLONE)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const { readdir, stat, copyFile } = require("fs-extra")
|
const { readdir, stat, copyFile, ensureDir } = require("fs-extra")
|
||||||
const { constants } = require("fs")
|
const { constants } = require("fs")
|
||||||
const { join, basename } = require("path")
|
const { join, basename } = require("path")
|
||||||
const serverConfig = require("../../server/config")()
|
const serverConfig = require("../../server/config")()
|
||||||
|
@ -56,6 +56,7 @@ const nodeModules = appName =>
|
||||||
const apps = await readdir(appPackages)
|
const apps = await readdir(appPackages)
|
||||||
|
|
||||||
const copySource = file => async toDir => {
|
const copySource = file => async toDir => {
|
||||||
|
await ensureDir(toDir)
|
||||||
const dest = join(toDir, basename(file))
|
const dest = join(toDir, basename(file))
|
||||||
try {
|
try {
|
||||||
await copyFile(file, dest, constants.COPYFILE_FICLONE)
|
await copyFile(file, dest, constants.COPYFILE_FICLONE)
|
||||||
|
|
Loading…
Reference in New Issue