doki-theme / doki-theme-template

Template Repository for creating new themes for different platforms
MIT License
2 stars 1 forks source link

This should be a package #4

Open nopeless opened 1 year ago

nopeless commented 1 year ago

TLDR; Ideally the developer should be able to provide one theme file/folder and be able to generate themes without having to go through too many steps as listed here


It would be much better if this is an npm package that exposes a getThemeDefinitions() method. It would also be nice to have helper methods such as injectToTemplate() documented

This way, it is easier to update the main theme and the amount of boilerplate needed to create a new theme reduces drastically

nopeless commented 1 year ago

Currently the full repository layout of creating themes has an advantage of creating a boilerplate folder structure for adding non-standard assets such as sticker overrides.

Maybe a createBoilerplateDirectory() would suit that purpose.

nopeless commented 1 year ago

An interace I am hoping for is something like

import { getThemes, renderTemplate } from "dokitheme";

const t = fs.readFileSync("template.json");

for (const theme of getThemes()) {
  fs.writeFileSync("out/" + theme.dir + "/" + theme.filename + ".json", renderTemplate(t, theme.variables);
}