xfiveco / generator-xh

A Yeoman generator for scaffolding web projects.
MIT License
55 stars 5 forks source link

WP folders are not ignored when dist is not ignored #205

Open arekf opened 8 years ago

arekf commented 8 years ago

When dist folder is not addded to .gitignore, WordPress ignored folders are also not being added, see: https://github.com/xhtmlized/generator-xh/blob/master/app/templates/gitignore#L36

Is there any reason for that?

piotr-bajer commented 8 years ago

Is this because of syntax error? Instead:

bower_components<% if (ignoreDist) { %>
dist<% if (isWP) { %>
wp/wp-content/themes/**/img
wp/wp-content/themes/**/fonts
wp/wp-content/themes/**/js
wp/wp-content/themes/**/css
wp/wp-content/themes/**/media
wp/wp-content/uploads<% } %><% } %>

should be:

bower_components<% if (ignoreDist) { %>
/dist<% } %><% if (isWP) { %>
wp/wp-content/themes/**/img
wp/wp-content/themes/**/fonts
wp/wp-content/themes/**/js
wp/wp-content/themes/**/css
wp/wp-content/themes/**/media
wp/wp-content/uploads<% } %>

Note "/dist" instead "dist" because of problems this definition introduces to some plugins (i.e. Yoast SEO) which uses such folder name.

See pull request: #219