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

JavaScript

Gulp question: dev and prod distribution management

I've already taken the Gulp class which was extremely helpful. I have concat, minify, and build scripts running without any issue.

My question is on the distribution and how to manage the different file paths of dev vs. prod files.

I'm developing using an HTML js include path of concatenated .js files such as: src = "/js/myconcat.js"

But the gulpfile minifies and builds to this for production: src = 'dist/js/myMinifiedConcat.js'

How do I manage this in the HTML? Is the common way to check what environment you're in on the server-side and base your include path on your environment? Or is there something I'm completely missing?

Anyone?