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

HTML

file structure and deployment

Hi everyone! I have created a basic project and I am not sure where to place my code after the minification process. My current file structure is :

resources css img js vendors css js I will use online tools to minify css and js. So to my understanding, I will have to create a dist file and place the code inside but will be valid if I just create the files (with same names as in the resources) and paste the new code inside? What about the links ? The files will have a different path so the links will not work..

1 Answer

Austin Whipple
Austin Whipple
29,725 Points

Ultimately, the file structure for your site's code is up to you. There are some best practices recommended when using certain frameworks, pre-processors, and/or dependency managers. However, if you're going without any of those things, it's totally up to you.

I don't find it strictly necessary to create a dist directory. In this case of only worrying about CSS, I'd just keep your minified version in either the same directory or in a parallel directory as the un-minified version so that you can use relative paths (../../img/icon.svg, for instance) and they all still work.