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

separate themes & plugins file #2038

Merged
merged 1 commit into from
Jul 29, 2023
Merged

separate themes & plugins file #2038

merged 1 commit into from
Jul 29, 2023

Conversation

stevenjoezhang
Copy link
Member

@stevenjoezhang stevenjoezhang commented Jul 28, 2023

Currently, the theme and plugin list are managed in a single file, which may lead to numerous merge conflicts. By splitting them and creating separate description files for each theme and plugin, this issue can be resolved.

const yaml = require('js-yaml');
const fs = require('fs');

let data = yaml.load(fs.readFileSync('plugins.yml'))
for (let entry of data) {
    let name = entry.name;
    delete entry.name;
    fs.writeFileSync(`plugins/${name}.yml`, yaml.dump(entry));
}

data = yaml.load(fs.readFileSync('themes.yml'))
for (let entry of data) {
    let name = entry.name;
    delete entry.name;
    fs.writeFileSync(`themes/${name}.yml`, yaml.dump(entry));
}

@github-actions
Copy link
Contributor

Theme name validation passed.
Theme thumbnails validation completed.

Copy link
Member

@yoshinorin yoshinorin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

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

Successfully merging this pull request may close these issues.

2 participants