create-bd-theme
v0.4.4
Published
A CLI to scaffold BetterDiscord themes.
Maintainers
Readme
create-bd-theme
A CLI to scaffold BetterDiscord themes.
Usage
Have BunJS v1.0 or above installed and then run the following command:
bunx create-bd-theme <directory name> [options]This will ask a series of questions such as: Theme name, Description, your GitHub name, and if you'd like it initalize a Git repository.
Make sure your GitHub name is correct as the CLI will use that for the GitHub Pages
@import.
Providing the--gitoption will initialize a git repo and skip asking you.
Move into the newly created directory and install the dependency using:
cd MyTheme
npm installNow you're able to access the dev and build scripts using:
npm run dev
# and
npm run buildThe dev script will watch the the src folder and compile them to your BetterDiscord themes folder.
The build script will compile the necessary files based off your bd-css.config.js config.
View bd-css for more info.
Deployment
When you're ready to share your awesome theme, all you need to do is push the changes to your repository and enable GitHub pages to target the deploy branch.
The resulting files will look along the lines of:
CoolTheme.theme.css
/**
* @name CoolTheme
* @author CoolPerson
* @version 1.0.0
* @description My cool theme
* @source https://github.com/me/CoolTheme
*/
@import url('https://coolperson.github.io/CoolTheme/CoolTheme.css');
:root {
--theme-variable: red;
}CoolTheme.css
#app-mount .container__2637a {
background: var(--theme-variable);
}Users will just need to download CoolTheme.theme.css and upon enabling the theme, Discord will fetch the @import contents.
