Shopify / themekit

Shopify theme development command line tool.
https://shopify.dev/tools/theme-kit
MIT License
1.19k stars 374 forks source link

Themekit's `new` command doesn't work well with Shopify 2.0 themes #950

Open JasonHassold opened 3 years ago

JasonHassold commented 3 years ago

It's frustrated me for awhile when I have local theme files and run the new command that it will still generate the Timber theme files, but now especially with the 2.0 theme template structure the new command is getting more annoying because it will generate the .liquid templates even though my theme has the .json template files.

I would love to see an option added to the new command where it only uses the local files and doesn't generate any Timber files. If there are some files that actually are required and theme creation will error out without them, the new command could just error out if those files do not exist locally (obviously this would have to handle original vs 2.0 theme formats).

Happy to discuss further

polidario commented 3 years ago

If you're going to create a new Shopify theme for OS2.0 using the current version of ThemeKit, unfortunately, you'll still have to manually convert all of the templates to JSON templates.

Personally, what I did is

  1. I created a new project using ThemeKit
  2. Then, converted all templates to JSON
  3. Then, push them to a new repository

So whenever I create a new theme, I just pull those files from my repo, and viola, all templates are compatible with OS2.0 lol

So yeah, the current ThemeKit is not yet updated to this new OS2.0 and I didn't like Shopify CLI for themes because it just clones Dawn. It's just annoying having those files.

But yeah, hopefully, they work on this so we can easily create new themes for OS2.0

phpjscoding commented 2 years ago

Here is a Shopify theme 2.0 theme with very minimal files and code boilerplate : https://github.com/phpjscoding/shopify-base-theme . you can use it to start your theme development