Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension should look for templates relatively or by setting. #392

Open
IngoVals opened this issue Oct 14, 2021 · 4 comments
Open

Extension should look for templates relatively or by setting. #392

IngoVals opened this issue Oct 14, 2021 · 4 comments
Labels

Comments

@IngoVals
Copy link

I'm using Webpack to build my theme so I have the liquid files inside a /src/static directory. I keep these static files in the same directory structure as they will be built as.

{% comment %} Inside theme.liquid {% endcomment %}
{% section 'header' %}

So theme-check extension checks my code automatically and gives me a MissingTemplate.

Since this file is located at src/static/layout I would like theme check to look in src/static/sections/header.liquid

If that is not possible maybe a base url setting for the extension for which theme check will be ran in.

@adrianocr
Copy link

I have the same issue.

It seems that the extension is built to only be compatible with flat theme structures.

@IngoVals
Copy link
Author

IngoVals commented Oct 14, 2021

I guess we could add a .theme-check.yml and set the root to either the '/dist' folder or '/src/static'

This is enabled by the theme check CLI tool that this extension uses under the hood

@charlespwd
Copy link
Contributor

Yep the way to do this is with .theme-check.yml as you said. What steps did you take to get the extension running? Do you have suggestions on how we could improve our docs (or their discoverability)?

@teknolog2000
Copy link

This seems broken when editing a theme from within a VSCode Workspace with many directories. I have my root: . in theme-check.yml but the root it goes to is seemingly the first directory in the workspace. If I open just the theme directory in a new VSCode window it works.

@jamesmengo jamesmengo transferred this issue from Shopify/theme-check-vscode Jun 20, 2024
@jamesmengo jamesmengo reopened this Jul 5, 2024
@jamesmengo jamesmengo added the enhancement New feature or request label Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants