0.03
A long-lived project that still receives updates
CLI helper for creating Discourse themes
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Discourse Theme

This CLI contains helpers for creating Discourse themes and theme components.

Installation

To install the CLI use:

$ gem install discourse_theme

Why this gem exists?

This gem allows you to use your editor of choice when developing Discourse themes and theme components. As you save files the CLI will update the remote theme or component and changes to it will appear live!

Usage

For help run:

discourse_theme

discourse_theme new PATH

Creates a new blank theme. The CLI will guide you through the process.

discourse_theme download PATH

Downloads a theme from the server and stores in the designated directory.

discourse_theme watch PATH

Monitors a theme or component for changes. When changed the program will synchronize the theme or component to your Discourse of choice.

discourse_theme upload PATH

Uploads a theme to the server. Requires the theme to have been previously synchronized via watch.

discourse_theme rspec PATH

Runs the RSpec system tests under the spec folder in the designated theme directory.

On the first run for the given directory, you will be asked if you'll like to use a local Discourse repository to run the tests.

If you select 'Y' and proceeds to configure the path to the local Discourse repository, the tests will be ran using the local Discourse development environment provided by the local Discourse repository. Note that you'll have to set up the local test environment before the tests can be ran successfully.

If the 'n' option is selected, the tests will run in a Docker container created using the discourse/discourse_test:release Docker image. Note that this requires Docker to be installed.

When the --headless option is used, a local installation of the Google Chrome browser is required.

Run discourse_theme --help for more usage details.

Contributing

Bug reports and pull requests are welcome at Meta Discourse. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the DiscourseTheme project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.