Skip to content

Commit

Permalink
add keyword to package.json after generation
Browse files Browse the repository at this point in the history
  • Loading branch information
gossi committed Mar 31, 2020
1 parent d77efd7 commit dcf0e02
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/generate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ export default class GenerateCommand {
packageJson.theemo.colorSchemes = Object.keys(this.config.colorSchemes);
packageJson.theemo.file = outFile;

if (!packageJson.keywords) {
packageJson.keywords = [];
}

if (!packageJson.keywords.includes('theemo-theme')) {
packageJson.keywords.push('theemo-theme');
}

const data = JSON.stringify(packageJson, null, ' ');
const packageFile = path.join(process.cwd(), 'package.json');
fs.writeFileSync(packageFile, data);
Expand Down

0 comments on commit dcf0e02

Please sign in to comment.