Menu icon Foundation
Use Foundation from NPM??

Foundation allows installation via package managers like Composer and NPM.

I have found not information how to use Foundation once those packages are installed!

Once Foundation is installed in NPM, I see all the files in the node_modules folder. Now what?

I want to create my own SCSS file and import only those Foundation parts that I need, so do I reference directly into the node_modules folder? Is there some additional NPM setup to do to pull SCSS out of that folder?

I found one Stackoverflow question regarding this and they called it a "mistake" to install Foundation via NPM. If installing via package managers is a mistake, why is it even allowed?

What is the next step to use Foundation in my project after it installs via NPM? There is no further docs how to make use of it.

Most people I've read, just go open the Foundation folder and copy out the SCSS and other files. That's kind of dumb to me, why do that and not just download the standard files then? Why even load through NPM at all?

 

This doesn't make sense. Should I install with NPM (or Composer)? And if that is a valid way to do it, then how do I use it in my project after installing?

npmcomposergatsbyscssSass

Foundation allows installation via package managers like Composer and NPM.

I have found not information how to use Foundation once those packages are installed!

Once Foundation is installed in NPM, I see all the files in the node_modules folder. Now what?

I want to create my own SCSS file and import only those Foundation parts that I need, so do I reference directly into the node_modules folder? Is there some additional NPM setup to do to pull SCSS out of that folder?

I found one Stackoverflow question regarding this and they called it a "mistake" to install Foundation via NPM. If installing via package managers is a mistake, why is it even allowed?

What is the next step to use Foundation in my project after it installs via NPM? There is no further docs how to make use of it.

Most people I've read, just go open the Foundation folder and copy out the SCSS and other files. That's kind of dumb to me, why do that and not just download the standard files then? Why even load through NPM at all?

 

This doesn't make sense. Should I install with NPM (or Composer)? And if that is a valid way to do it, then how do I use it in my project after installing?

Dominik Pieper 7 months ago

Hi,

are you new to npm and frontend technologies?

With npm it's quite easy. For example if you use sass you can use @inlude '~foundation-sites/...' to import stuff. The ~ will resolve to your node_modules folder. 

Benoit Lemay 7 months ago

If you followed this.. 

https://www.youtube.com/watch?v=rQguHjGzFEw

and/or 

https://www.youtube.com/watch?v=JlarIkhBj54

 

Then you put your scss files in your src\assets\scss