DynamoMTL / shopify-pipeline

Shopify Pipeline - A modern pipeline for Shopify theme development
MIT License
86 stars 16 forks source link

Feature Request: subdirectories in template/snippets #101

Open lastobelus opened 6 years ago

lastobelus commented 6 years ago

Proposal:

Allow organizing snippets & templates into folders. When uploading, upload files using a BEM-style naming convention:

Given

snippets
    head
        meta-tags.liquid
        collection-meta-tags.liquid
    products
         loop.liquid
         thumbnail.liquid

the following would be uploaded to shopify:

snippets/head__meta-tags.liquid
snippets/head__collection-meta-tags.liquid
snippets/products__loop.liquid
snippets/products__thumbnail.liquid

(I can work on this if someone is willing to point me in the right direction by suggesting a general approach)

nddery commented 6 years ago

You could look into file-loader name option. Not sure what's the parameter(s) it receives but maybe there's something to do there.

So instead of passing the path and name as we currently do, you could BEM-ize the path/name.