Skip to content

Commit

Permalink
chore: Removes 'material' template from 'list' cmd output (#1700)
Browse files Browse the repository at this point in the history
* chore: Removes 'material' template from 'list' cmd output

* docs: Adding changeset

* refactor: Better archived repo check

Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>
  • Loading branch information
rschristian and JoviDeCroock authored Jun 14, 2022
1 parent 6385ec1 commit a60f8df
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/real-owls-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'preact-cli': patch
---

Removes the archived & non-recommended 'material' template from 'preact list' output
14 changes: 8 additions & 6 deletions packages/cli/lib/commands/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ module.exports = async function () {
process.stdout.write('\n');
info('Available official templates: \n');

repos.map(repo => {
const description = repo.description ? ` - ${repo.description}` : '';
process.stdout.write(
` ⭐️ ${bold(magenta(repo.name))}${description} \n`
);
});
repos
.filter(repo => !repo.archived)
.forEach(repo => {
const description = repo.description ? ` - ${repo.description}` : '';
process.stdout.write(
` ⭐️ ${bold(magenta(repo.name))}${description} \n`
);
});

process.stdout.write('\n');
} catch (err) {
Expand Down

0 comments on commit a60f8df

Please sign in to comment.