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

fix: generator: use default value (cwd) for component generator path #85

Closed
wants to merge 1 commit into from

Conversation

jmuzina
Copy link
Member

@jmuzina jmuzina commented Dec 16, 2024

Done

Adjusts the configuration of the React component generator so that the current working directory is used as a default if no component path is provided.

Fixes #83

QA

  • Checkout this PR
  • bun i
  • yo @canonical/ds:component: generate a component in the current working directory
  • yo @canonical/ds:component path/to/new/component: generate a component in a subdirectory relative to the current working directory
  • yo @canonical/ds:component --help: See that the componentPath help text is updated to mention its default value.

PR readiness check

  • PR should have one of the following labels:
    • Feature 🎁, Breaking Change 💣, Bug 🐛, Documentation 📝, Maintenance 🔨.
  • All packages define the required scripts in package.json:
    • All packages: check and check:fix.
    • Packages with a build step: build.

Screenshots

Screenshot 2024-12-16 at 15 34 04
Screenshot 2024-12-16 at 15 35 36

@advl
Copy link
Contributor

advl commented Dec 18, 2024

With this PR, it seems we introduce a regression as the name of the component becomes optional, whereas it is definitely a required parameter.

@jmuzina
Copy link
Member Author

jmuzina commented Dec 18, 2024

Closing per need of further discussion (ref)

@jmuzina jmuzina closed this Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generator: component path option required
2 participants