Skip to content

Duplication of files (in wrong dirs) when doing multiple dir copies #310

Open
@tmarshall

Description

@tmarshall

I have a taskfile that has a portion like this:

module.exports.copyProcs = async function copyProcs(task) {
  await task.source('procs/**/*.js').target('dist/procs')
  await task.source('procs/**/.*').target('dist/procs')
}

module.exports.copyConf = async function copyConf(task) {
  await task.source('conf/**/.*').target('dist/conf')
}

module.exports.copyDirs = async function copyDirs(task) {
  await task.parallel(['copyProcs', 'copyConf'])
}

module.exports.build = async function build(task) {
  // compile is not necessary to show
  await task.serial(['compile', 'copyDirs'])
} 

taskr build is my yarn build

This should copy all .js files and . files (specifically .gitignore) from procs to dist/procs

It should also copy all . files (specifically .eslintrc and .jscsrc) from conf to dist/conf

When run, it is copying .eslintrc and .jscsrc to both dist/conf and dist/procs.

If I change the content of function copyDirs to await task.serial(['copyProcs', 'copyConf']) it works as expected.

Not sure what the reason it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions