generator-xh
generator-xh copied to clipboard
WP folders are not ignored when dist is not ignored
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?
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