fixed npm i prepare plugins error

pull/2303/head
REJack 2019-10-03 13:51:18 +02:00
parent c22642766e
commit 3be22b6be9
No known key found for this signature in database
GPG Key ID: 9F3976CC630CC888
1 changed files with 5 additions and 1 deletions

View File

@ -28,7 +28,11 @@ class Publish {
// Publish files
Plugins.forEach((module) => {
try {
fse.copySync(module.from, module.to)
if (fse.existsSync(module.from)) {
fse.copySync(module.from, module.to)
} else {
fse.copySync(module.from.replace('node_modules/', '../'), module.to)
}
if (this.options.verbose) {
console.log(`Copied ${module.from} to ${module.to}`)