mixmaxhq / install-files

Share files like you would code, using npm.
MIT License
3 stars 2 forks source link

Don't think this works with Yarn #11

Closed wearhere closed 7 years ago

wearhere commented 7 years ago

Files are not copied over upon doing yarn add <install-files-using-package>, nor on yarn upgrade <install-files-using-package>. No error, just no files. https://github.com/yarnpkg/yarn/issues/2878 might explain no files on upgrade but idk about no files on install. Haven't yet done local testing to see whether/when the install scripts are executed.

Tested with yarn 0.21.3.

wearhere commented 7 years ago

A workaround, for the meantime: after adding/upgrading an install-files-using module, from the project root, do

cp -r node_modules/path/to/module/source/ .

If the install-files-using module has put its files-to-be-installed in source/ (like here), this will do the same thing as the install script (recursively merge source/ into the current directory).

So then at least you continue to get the benefits of using npm to version / distribute your files even if they're not installed atm.