On Wed, 09 Apr 2014 18:30:18 GMT, Gary Willoughby wrote:

When building is it possible to copy a folder to the output destination?

I have a folder called 'dist/library/..' in a dependency and when i build i need to copy the whole folder to my project. I can copy files successfully using the 'copyFiles' command but how to copy whole folders? Here's my package.json:

{

"name": "tcltk",
"description": "Bindings to Tcl/Tk for the D programming language",
"homepage": "https://github.com/nomad-software/tcltk",
"authors": ["Gary Willoughby"],
"copyright": "Copyright (c) 2014 Gary Willoughby",
"license": "MIT",
"libs-posix": ["tcl", "tk"],
"sourceFiles-windows-x86-dmd": ["lib/windows/x86/omf/tcl86t.lib", "lib/windows/x86/omf/tk86t.lib"],
"sourceFiles-windows-x86-ldc": ["lib/windows/x86/coff/tcl86t.lib", "lib/windows/x86/coff/tk86t.lib"],
"sourceFiles-windows-x86-gnu": ["lib/windows/x86/coff/tcl86t.lib", "lib/windows/x86/coff/tk86t.lib"],
"sourceFiles-windows-x86_64": ["lib/windows/x86_64/coff/tcl86t.lib", "lib/windows/x86_64/coff/tk86t.lib"],
"copyFiles-windows-x86": ["dist/library", "dist/x86/tcl86t.dll", "dist/x86/tk86t.dll"],
"copyFiles-windows-x86_64": ["dist/library", "dist/x86_64/tcl86t.dll", "dist/x86_64/tk86t.dll"],
"excludedSourceFiles": [
	"source/c/*",
],
"dependencies": {
	"x11": "~master"
},
"subConfigurations": {
	"x11": "tcltk-import"
},

}

Here's the error:

Copying files...
Failed to copy to C:\Users\gary\Desktop\tkd\library

Currently copyFiles is not intended to handle directories. Although that would be easy to add, the semantics would be slightly ambiguous: Should the folder be copied or just its contents?

But the real issue is that copyFiles is really just a temporary solution. What is really needed is a mechanism that allows to specify the output folder, possibly with some advanced support for system standard directories.