How to customize the Yarn package folder structure?

0

With Bower recommending migrating pro Yarn as an alternative to front-end dependency management, I decided to abandon it and study more about the Yarn . And yes, the news on the recommendation is old, but I just learned recently.

The point is that like NPM , Yarn downloads dependencies within the /node_modules directory and each downloaded package comes in full format, or

I am aware that I would not even need to upload these files to the production server, I would just run the yarn install command and the files would be transferred to that directory.

However, I do not like the way packages are organized in it, it would be much better if the .css files were in /assets/css or .js in /assets/js , for example.

Bower this was possible. I used a package called bower-installer which reorganized the files of all dependencies the way I needed it.

The most I could do was to find the command yarn add [package] --modules-folder [folder] that the only thing it does is to change the /node_modules directory to some other directory.

If anyone can help, thank you in advance.

    
asked by anonymous 31.01.2018 / 15:44

0 answers