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: add cli #7

Merged
merged 8 commits into from
Jan 28, 2025
Merged

feat: add cli #7

merged 8 commits into from
Jan 28, 2025

Conversation

kom-senapati
Copy link
Contributor

@kom-senapati kom-senapati commented Jan 26, 2025

/claim #4
Closes #4

@algora-pbc algora-pbc bot mentioned this pull request Jan 26, 2025
Copy link
Member

@imrishabh18 imrishabh18 left a comment

Choose a reason for hiding this comment

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

Also, the bun.lockb is missing cause I can see you have added a new dependency

tests/cli/sample-input.json Outdated Show resolved Hide resolved
tests/cli/test4.test.tsx Outdated Show resolved Hide resolved
cli/main.ts Outdated Show resolved Hide resolved
@kom-senapati
Copy link
Contributor Author

@imrishabh18 check if its good to go

package.json Outdated Show resolved Hide resolved
cli/main.ts Outdated Show resolved Hide resolved
Copy link

@Anshgrover23 Anshgrover23 left a comment

Choose a reason for hiding this comment

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

@kom-senapati can u add a video showing the command is generating the output.jsx file correctly.

@kom-senapati
Copy link
Contributor Author

@Anshgrover23

cursorful-video-1737977667008.mp4

}
export const Circuit = (props: Props) => {
return (
<chip
Copy link
Member

@imrishabh18 imrishabh18 Jan 27, 2025

Choose a reason for hiding this comment

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

@seveibar Is this package circuit-json-to-tscircuit only for Chip components? As I can see if you pass a simple resistor as the circuit-json in this case, it still outputs a <Chip />

Copy link
Contributor

@seveibar seveibar Jan 27, 2025

Choose a reason for hiding this comment

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

It should work for different types of components, not always chips

(may not work correctly currently)

Copy link
Member

Choose a reason for hiding this comment

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

The current convertCircuitJsonToTscircuit function is just having the <Chip /> template

https://github.com/tscircuit/circuit-json-to-tscircuit/blob/main/lib/get-component-using-template.ts

Copy link
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

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

generally looks ok to me but let's get @imrishabh18 's approval before merging

@seveibar
Copy link
Contributor

@imrishabh18 the chip issue seems like a separate issue that we should file

@imrishabh18 imrishabh18 merged commit 55be8fe into tscircuit:main Jan 28, 2025
3 checks passed
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.

Add cli interface
4 participants