Setup: https://forums.slime2.stream/resources/getting-started-with-slime2.3/ Customization: https://forums.slime2.stream/resources/base-chat.10/field?field=customization Support: https://forums.slime2.stream/forums/help.13/
- Do not claim this as your own or sell it
- You may modify this to create your own slime2 theme, and you can freely share or sell your theme
- Feel free to post your theme here on the forums: https://forums.slime2.stream/resources/categories/themes.2/
It's not necessary to build themes using this, but if you do then you get the added benefit of hot reloading and using .env.local for your tokens instead of directly including them in TOKEN.js.
-
You'll need to install:
- git (https://git-scm.com/)
- Node.js (https://nodejs.org/en) (LTS version recommended)
-
Use git to clone the repo.
- I recommend using Fork (https://git-fork.com/)
-
Open the folder using the code editor of your choice.
- I recommend using VS Code (https://code.visualstudio.com/)
-
In the terminal, navigate to the repo (VS Code terminal will already be there), and run this command:
npm install -
Create a
themesfolder at the root of the repo, and then create a folder inside that with the name of your custom theme. The folder structure should look like this:📁 client \_📄 base.css \_📄 base.html \_📄 base.js \_📄 TOKEN.js 📁 release 📁 src 📁 themes \_📁 custom ... -
Copy
base.css,base.js,base.html, andTOKEN.jsfrom theclientfolder into your custom theme folder. Rename thebase.*files to use the name of your custom theme instead ofbase. It should now look like this:... 📁 themes \_📁 custom \_📄 custom.css \_📄 custom.html \_📄 custom.js \_📄 TOKEN.js ... -
Duplicate the
.env.productionfile, renaming the copy to.env.local. In the file, set the value ofVITE_TWITCH_TOKENto the token that you can obtain from https://slime2.stream/token. It should look like this:VITE_TWITCH_TOKEN = 'yourTokenHere'- You could instead set this inside
TOKEN.js, but this way you don't have to remember to remove it fromTOKEN.jswhen you're ready to package and release the theme.
- You could instead set this inside
-
Run this command, substituting
customwith the name of your theme:npm run theme theme.custom -
The overlay should automatically open up in your web browser, and if you edit anything in your theme's custom folder, it will automatically update when you save! (Also known as hot reloading)
-
Once you're ready to package and release your theme, open
TOKEN.jsand double check that your token is NOT there. Then run this command, substitutingcustomwith the name of your theme:npm run theme-build theme.custom -
This will create a new
themes/release-*folder using the name of your theme, which will look like this:📁 client 📁 release 📁 src 📁 themes \_📁 custom \_📁 release-custom \_📄 custom.css \_📄 custom.html \_📄 custom.js \_📄 TOKEN.js ...- This will automatically update the HTML file to include the JS and CSS of the repo's version of slime2, replaces all instances of
{version}with the slime2 version number, and replaces all instances of{theme}with your theme name.
- This will automatically update the HTML file to include the JS and CSS of the repo's version of slime2, replaces all instances of
-
Zip all of the
release-*files, naming the.zipwhatever you want, but I would recommend something likeCustom-Chat-1.0.0.zip, and whenever you make a new update, update that version number accordingly! -
Distribute that
.zipfile however you want! And if you just want to use your theme yourself, copy all of those files into a separate folder, put your token from https://slime2.stream/token intoTOKEN.js, and load your HTML file into a browser source in OBS as a local file! -
Bonus Tip: Use the
themesfolder itself as a git repo to easily track and version control your own theme development!