Skip to content

Conversation

@pvignau
Copy link
Collaborator

@pvignau pvignau commented Sep 10, 2025

This pull request updates the plugin selection logic in the initCmd function to support plugin groups and prevent duplicate installations. The most important changes are:

Plugin selection logic improvements:

  • Updated the plugin options in the multiselect prompt so that each option can now represent one or more plugins (e.g., the "Sass" option now installs both @terrazzo/plugin-css and @terrazzo/plugin-sass). This allows for grouped plugin installation.

  • Modified the logic for determining which plugins to install by flattening the selected plugin arrays, filtering out already installed plugins, and using a Set to ensure no duplicates are installed.## Changes

Fixes #531

How to Review

  1. Initialize a new Terrazzo project:

    npx tz init
    • Select any design system (e.g., "Adobe Spectrum").
    • When prompted to "Install plugins?", select "Sass" but do not select "CSS".
  2. The init command will complete successfully, reporting that the plugins were installed.

  3. Attempt to build the project:

    npx tz build

It should build !

@changeset-bot
Copy link

changeset-bot bot commented Sep 10, 2025

🦋 Changeset detected

Latest commit: d465304

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@terrazzo/cli Patch
@terrazzo/plugin-css Patch
@terrazzo/plugin-js Patch
@terrazzo/plugin-sass Patch
@terrazzo/plugin-swift Patch
@terrazzo/plugin-tailwind Patch
@terrazzo/plugin-vanilla-extract Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Collaborator

@drwpow drwpow left a comment

Choose a reason for hiding this comment

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

Perfect, thank you!

@drwpow drwpow merged commit e1a612f into terrazzoapp:main Sep 10, 2025
5 checks passed
@github-actions github-actions bot mentioned this pull request Sep 10, 2025
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.

First build after init with Sass plugin fails

2 participants