Menu icon Foundation
How can I add libsass / grunt support to an existing F5 project that was created without it?

I created a project with `foundation new MY_PROJECT` that's pretty far along now. How can I add libsass / grunt support to this existing project?

Gruntlibsass

I created a project with `foundation new MY_PROJECT` that's pretty far along now. How can I add libsass / grunt support to this existing project?

Chris Matthias over 5 years ago

Did you try creating a new branch (if using git) or a test folder with your current setup and running foundation update --libsass?

Gary "Lee" Clark, II over 5 years ago

@Chris,

I just tried this and it didn't work. I'm running into the same problem upgrading from a ZF3.2.5 site. I'm going to assume that I'll have to create a new site and push my original files into it. Once that's done, then updating the grunt file should be enough to get the project on track.

Chris Matthias over 5 years ago

I started working on a Wordpress theme with Foundation 5 using libsass and I think that you just need to have Gruntfile.js and package.json in your project folder like mine: https://github.com/thetrickster/FoundationPress-child

You can keep the concat and other grunt methods in there or comment them out-- you're really mostly concerned with the libsass "watch" method anyway.

Once you have those two files in your project you might be able to run npm install && bower install to grab all the grunt/bower dependencies and run grunt once to setup/watch the sass.

The gruntfile I'm using copies the bower_compenents folder to /js/ in your project and also minifies and concatenates the foundation and app script files into one js-- edit or comment out whatever you don't need in my Gruntfile.js or create a temp foundation project using libsass and copy those files over from there.

Josef Ulander over 5 years ago

Awesome Chris! I'm going to try out your wordpress theme!