Discourse Theme CLI (console app to help you build themes)

Alright. here’s what showed up

Ok thanks, and you still get the error containing 2.3 when you run discourse_theme?

Can you try running the same command, but with the full path to the 2.7 gem. So

/usr/local/lib/ruby/gems/2.7.0/bin/discourse_theme download kache-tests

This worked. Thanks a lot!!!

Aha! Brilliant :tada:

To try and uninstall the broken version, you should be able to do something like:

/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/gem uninstall discourse_theme

And then hopefully the correct version will take over when you type discourse_theme :crossed_fingers:


Alright. Thanks a bunch for your help!


ANYONE who is working on a theme needs this tool! It cuts about 93 steps out of the iteration process :slight_smile: Thanks to @sam, @david and the rest of the team that helped make it happen.


Is there a way to tell discourse_theme what file extensions to ignore?

» Detected changes in 2 files, uploading theme
✘ Error in extra_js discourse/templates/components/categories-boxes.hbs~: Unrecognized file extension: hbs~
✘ Error in extra_js discourse/templates/components/subcategory-wrapper.hbs~: Unrecognized file extension: hbs~
✘ (end of errors)
✔ Done! Watching for changes...

This message seems new and is an improvement, I think.

And for a while, at least, it would just crash if you used visual studio due to what I assume must be its backup and/or lock files. I’ve not tried today. (I’m slow to leave the One True Editor.)

I don’t see where extra_js lives in order to try to fix it up.

1 Like

Interesting… no, right now we don’t have any way to set ignored patterns. Maybe we could teach the CLI to read a .gitignore or .ignore file :thinking:


Meanwhile, I told emacs to keep backup and temp files elsewhere. But paying attention to git ignore is a great idea.

1 Like

Hi there, I am experiencing the same issue. Was this resolved for you?