Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Jess Hardy
Jess Hardy
12,811 Points

Grunt structure help

Hello all,

I am trying to get some of my projects set up using Grunt, switching from Codekit, but I have a few questions on if and how I would set up a certain structure.

I want to have a project folder with a dev, prod, and build folder.

  • My biggest question is, can all of the npm_modules and etc. go in the build folder and then point to the dev and prod folders?
  • Can my dev and prod folder each point to out to that build folder?
  • For anyone using LESS, how do I set up to process my files and generate a sourcemap?

Thanks everyone

Jess

1 Answer

Michael Wiss
Michael Wiss
19,233 Points

You can name the folders anything you'd like. The npm modules are task runners, I think you should just have them point to all three; dev, prod and build. To set up multiple targets: