You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module.exports.copyProcs=asyncfunctioncopyProcs(task){awaittask.source('procs/**/*.js').target('dist/procs')awaittask.source('procs/**/.*').target('dist/procs')}module.exports.copyConf=asyncfunctioncopyConf(task){awaittask.source('conf/**/.*').target('dist/conf')}module.exports.copyDirs=asyncfunctioncopyDirs(task){awaittask.parallel(['copyProcs','copyConf'])}module.exports.build=asyncfunctionbuild(task){// compile is not necessary to showawaittask.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 bothdist/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.
The text was updated successfully, but these errors were encountered:
Hi, i guess it is known issue, this is because when you run run tasks in parallel they started at the same time and share same internal context. That's why some internal vars polluted. Simple fix will be just to use serial in copyDirs task.
I have a taskfile that has a portion like this:
taskr build
is myyarn build
This should copy all
.js
files and.
files (specifically.gitignore
) fromprocs
todist/procs
It should also copy all
.
files (specifically.eslintrc
and.jscsrc
) fromconf
todist/conf
When run, it is copying
.eslintrc
and.jscsrc
to bothdist/conf
anddist/procs
.If I change the content of
function copyDirs
toawait task.serial(['copyProcs', 'copyConf'])
it works as expected.Not sure what the reason it.
The text was updated successfully, but these errors were encountered: