foundation-cli
foundation-cli copied to clipboard
Use Yarn as package manager?
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.)
I'll be working on integrating (and conditionally using) yarn
this weekend, should have a PR open by Sunday depending on my availability.
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.
@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