From a60f8df8e87935f3b3e03a2bb4aecda801568c83 Mon Sep 17 00:00:00 2001 From: Ryan Christian <33403762+rschristian@users.noreply.github.com> Date: Mon, 13 Jun 2022 22:11:53 -0500 Subject: [PATCH] chore: Removes 'material' template from 'list' cmd output (#1700) * chore: Removes 'material' template from 'list' cmd output * docs: Adding changeset * refactor: Better archived repo check Co-authored-by: Jovi De Croock --- .changeset/real-owls-bathe.md | 5 +++++ packages/cli/lib/commands/list.js | 14 ++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 .changeset/real-owls-bathe.md diff --git a/.changeset/real-owls-bathe.md b/.changeset/real-owls-bathe.md new file mode 100644 index 000000000..0b6a65c7e --- /dev/null +++ b/.changeset/real-owls-bathe.md @@ -0,0 +1,5 @@ +--- +'preact-cli': patch +--- + +Removes the archived & non-recommended 'material' template from 'preact list' output diff --git a/packages/cli/lib/commands/list.js b/packages/cli/lib/commands/list.js index b2e39c6cd..0d6688285 100644 --- a/packages/cli/lib/commands/list.js +++ b/packages/cli/lib/commands/list.js @@ -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) {