archetype-themes / plugin-theme-component

A Shopify CLI plugin for building theme components.
MIT License
9 stars 4 forks source link

CLI: Specify ignore files #312

Closed t-kelly closed 4 months ago

t-kelly commented 9 months ago

Current Situation If I decide to replace the contents of icon files, like snippets/icon.liquid, I probably won't want it overridden the next time I run shopify theme component install.

Proposed solution The shopify.theme.toml file should allow us to specific globs that will result in shopify theme component install ignoring certain files

fleveillee commented 6 months ago

If we use that technique, we should also consider it when using the dev command. The ignored files should do the opposite and overwrite the component assets in the .explorer folder.

Alternatively, we could promote the technique in your GitHub integration video, but I'm not a big fan. It is a little too advanced for my taste.

fleveillee commented 6 months ago

Another idea is that if we implement Licenses as proposed in #332, we could check for a license before updating a file. If no license is present, the file was altered, and we should not replace it.

fleveillee commented 6 months ago

As per @t-kelly, the #332 licensing magic should be put aside for now. Ignore files' list is already a thing in the Shopify CLI toml world. We should investigate their use of it and implement it similarly.