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

feat(cli): add component command #7384

Merged

Conversation

joshblack
Copy link
Contributor

Reference #7360

This PR creates an initial command for creating a component. This does not include the package scaffold, instead it scaffolds out files inside of our react project following our current practices.

Changelog

New

  • Add component command to @carbon/cli

Changed

Removed

Testing / Reviewing

  • Try and create your own component with it! You can reference the CLI with the path ./packages/cli/bin/carbon-cli.js and can call it directly from your shell
  • See if tests and stories work 😬

@joshblack joshblack requested a review from a team as a code owner December 1, 2020 22:35
@netlify
Copy link

netlify bot commented Dec 1, 2020

Deploy preview for carbon-elements ready!

Built with commit 67c4828

https://deploy-preview-7384--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Dec 1, 2020

Deploy preview for carbon-components-react ready!

Built with commit 67c4828

https://deploy-preview-7384--carbon-components-react.netlify.app

@netlify
Copy link

netlify bot commented Dec 1, 2020

✔️ Deploy preview for carbon-elements ready!

🔨 Explore the source changes: 6c93816

🔍 Inspect the deploy logs: https://app.netlify.com/sites/carbon-elements/deploys/5fcbb657475e2500071669f6

😎 Browse the preview: https://deploy-preview-7384--carbon-elements.netlify.app

@dakahn
Copy link
Contributor

dakahn commented Dec 1, 2020

Should there be output when the command is run?
image

@netlify
Copy link

netlify bot commented Dec 1, 2020

✔️ Deploy preview for carbon-components-react ready!
Built without sensitive environment variables

🔨 Explore the source changes: 6c93816

🔍 Inspect the deploy logs: https://app.netlify.com/sites/carbon-components-react/deploys/5fcbb657cea71200085a36a2

😎 Browse the preview: https://deploy-preview-7384--carbon-components-react.netlify.app

@joshblack
Copy link
Contributor Author

@dakahn sorry, to be specific the command would be:

./packages/cli/bin/carbon-cli.js component

@tw15egan
Copy link
Member

tw15egan commented Dec 2, 2020

cli

Screen Shot 2020-12-02 at 12 36 03 PM

Very cool!

@dakahn
Copy link
Contributor

dakahn commented Dec 2, 2020

maybe not a blocker, but there's a permission denied error on WSL
image

@joshblack
Copy link
Contributor Author

@dakahn I think that's because the path you gave /caverns is at /caverns instead of a relative path (like components/caverns) and the profile trying to run the command doesn't have permissions to write to that path

Copy link
Contributor

@dakahn dakahn left a comment

Choose a reason for hiding this comment

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

That worked! More WSL weirdness

@kodiakhq kodiakhq bot merged commit 74b0850 into carbon-design-system:master Dec 5, 2020
@joshblack joshblack deleted the feat/add-component-command branch December 5, 2020 16:51
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.

None yet

3 participants