Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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: