Shopify / slate

Slate is a toolkit for developing Shopify themes. It's designed to assist your workflow and speed up the process of developing, testing, and deploying themes.
https://shopify.github.io/slate
MIT License
1.28k stars 364 forks source link

Generated script-tags for customer templates not checking Windows Slashes #966

Closed YourWishes closed 5 years ago

YourWishes commented 5 years ago

Problem

See #806 - Resolved issue does not work for Windows under slate-tools/tools/webpack/script-tags.html, since; <% if (htmlWebpackPlugin.options.liquidTemplates[chunk].includes('customers/')) { %> will be false on windows due to directory slashes being \ rather than /

Replication steps

  1. Pull Slate starter theme on a Windows based PC
  2. Execute yarn build
  3. Inspect dist/snippets/script-tags.liquid to see that the template if statement will be as: {%- if template == 'login' -%}

More Information

Easily fixed by replacing / with \\ on Windows, ideally needs to facilitate both environments.

t-kelly commented 5 years ago

A PR would be welcome!

t-kelly commented 5 years ago

🤦‍♂️ Of course I didn't see it. Thanks!

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.