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

Joe Bruno
Joe Bruno
35,909 Points

Sass like @import for Javascript?

Hello,

I have recently been introduced to Sass and have completed the treehouse courses. I love it. In particular, I have found it useful to be able to import stylesheets and export all my css for a project in one minified file. I wondered if anyone new how to do this with js files? I know it is possible. I have done it in a ruby project before, does anyone have a suggestion? Any help would be appreciated!

Thanks!

1 Answer

Dave McFarland
STAFF
Dave McFarland
Treehouse Teacher

Hi Joe Bruno

You can use a build tool like Gulp to do this. Here are a couple of articles explaining how Gulp works, including examples of how to concatenate multiple JS files into a single, minified file.