Skip to content

Commit

Permalink
fix: fix paths
Browse files Browse the repository at this point in the history
  • Loading branch information
KP2048 committed Feb 20, 2023
1 parent 8477d09 commit 0c01041
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ function build(args: yargs.ArgumentsCamelCase<{ dev: boolean }>)

if (has_python)
{
entries.push(...glob.sync(`${plugin.name}/*.py`, {nodir: true}))
entries.push(...glob.sync(`${plugin.name}/*.py`, {nodir: true}).map(value => path.basename(value)))
}

if (has_defaults)
Expand All @@ -203,7 +203,7 @@ function build(args: yargs.ArgumentsCamelCase<{ dev: boolean }>)
fs.copySync(path.join(plugin.name, 'defaults', name), path.join(plugin.name, name), {
recursive: true
});
entries.push(path.join(plugin.name, name))
entries.push(name)
}
} else
{
Expand All @@ -219,17 +219,17 @@ function build(args: yargs.ArgumentsCamelCase<{ dev: boolean }>)

if (license)
{
entries.push(path.join(plugin.name, license))
entries.push(license)
}

if (readme)
{
entries.push(path.join(plugin.name, readme))
entries.push(readme)
}

for (const entry of entries)
{
fs.copySync(path.join(process.cwd(), entry), path.join(process.cwd(), output, plugin.name, entry), {
fs.copySync(path.join(process.cwd(), plugin.name, entry), path.join(process.cwd(), output, plugin.name, entry), {
recursive: true
})
}
Expand Down

0 comments on commit 0c01041

Please sign in to comment.