ask-cli icon indicating copy to clipboard operation
ask-cli copied to clipboard

fix: allow source folder copy task to dereference symlinks

Open benmarch opened this issue 4 years ago • 2 comments

Issue #, if available:

Description of changes:

I have my skill source code set up as a package in a monorepo, and the symlinked NPM modules (the other packages) are not copied into the build folder. This change instructs fs-extra to also copy the symlinked modules.

I wasn't sure if it was worth writing new tests for this change or updating the existing ones. I could also make this a config option for CodeBuilder instead of hardcoding it to true (and adding a cli option to set it). Any input or advice would be appreciated.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

benmarch avatar Dec 19 '21 17:12 benmarch

Hi @benmarch, thanks for the PR Yes adding it as a config option is better than hardcoding and also feel free to add new test cases for the changes :)

Shreyas-vgr avatar Dec 28 '21 00:12 Shreyas-vgr

@Shreyas-vgr apologies for the delay. I've added two config options: dereference-symlinks and no-npm-install. I'm not sure the latter makes sense as a config option because it only affects an Node/NPM-based skill, but it was necessary to get my skill working.

After these changes, I realized that I could use a custom hook to accomplish the same thing, but I think there's something lost by using a hook instead of the built-in support for Node skills.

Let me know what you think, thanks!

benmarch avatar Feb 05 '22 20:02 benmarch