Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This should be a package #4

Open
nopeless opened this issue Mar 28, 2023 · 2 comments
Open

This should be a package #4

nopeless opened this issue Mar 28, 2023 · 2 comments

Comments

@nopeless
Copy link
Contributor

nopeless commented Mar 28, 2023

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant