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

Use Yarn as package manager?

Open snoopdouglas opened this issue 8 years ago • 3 comments

After downloading the template, npm starts doing its thing, which can (in my experience) take over 10 minutes to complete, especially without cached packages. Yarn is generally speedier; it could make the initial setup quicker.

Would it therefore be worth checking whether Yarn is installed on the user's machine - and using it if it is? (I'd imagine installing Yarn is probably beyond the scope of foundation-cli.)

snoopdouglas avatar Dec 12 '16 15:12 snoopdouglas

I'll be working on integrating (and conditionally using) yarn this weekend, should have a PR open by Sunday depending on my availability.

sudoforge avatar Apr 07 '17 20:04 sudoforge

I just installed foundation-cli as per the instructions currently on the site, which uses npm. When I start the process, I see a message that basically recommends Yarn and Webpack:

╭  Wed 14 9:27:48 aporter@aporter-mbp ~/Developer/Wavetronix
╰ → npm install --global foundation-cli
npm WARN deprecated [email protected]: ..psst! While Bower is maintained, we recommend
Yarn and Webpack for *new* front-end projects! Yarn's advantage is security and
reliability, and Webpack's is support for both CommonJS and AMD projects.
Currently there's no migration path but we hope you'll help us figure out one.

partydrone avatar Jun 14 '17 15:06 partydrone

@sudoforge I would like to see this too but I have a few questions. Could be wrong but this process seems to be done in the new.js file which basically just runs the npm.commands.install and is essentially the same as npm i. Also the project templates may need to have the package-lock.json files removed... and a yarn lock file added.

To solve this, we could replace the rewrite the npmInstall function to: a. check if !yarnInstall, then use child_process.exec() install yarn globally, b. else run yarn install c. log errors

HansUXdev avatar Sep 06 '18 00:09 HansUXdev