sondr3 / generator-jekyllized

A Yeoman generator for Jekyll to rapidly build sites using Gulp
MIT License
326 stars 35 forks source link

Avoid copying assets to dist directory in the default task #128

Closed ferrarimarco closed 8 years ago

ferrarimarco commented 8 years ago

When running the default task, gulp runs also assets:copy.

Is this useful?

After any edit to Jekyll contents, the dist/assets directory disappears as it's overwritten by Jekyll. This could lead to an inconsistent, undocumented state. If a dev assumes that the contents of the dist directory always represent the finalized build, he/she could deploy an incomplete artifact with the 'dist/assets' directory missing.

I run the assets:copy task only with the build one, when I know that I am building the final package.

Any thoughts on this? Thanks

EDIT: this could be expanded avoiding the dist directory altogether unless running gulp build.

sondr3 commented 8 years ago

Huh, I hadn't actually thought of that. Thanks, I'll figure something out for this. Not sure what it'd be though, I'd like for the folder to be in a state where you could upload it without having to run --prod on it as well or having to do gulp build, but I'm not sure there's a good way to do that yet. I'll take a look once I'm done with my exams.

ferrarimarco commented 8 years ago

It could be done by a watch task that on all the .tmp subdirectories (see #127) used to serve content. I'll try to refine my current approach this way and let you know.

ferrarimarco commented 8 years ago

After completing the work on #127, I can send another PR for this.