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

setup @liam/cli package #73

Merged
merged 5 commits into from
Nov 8, 2024
Merged

setup @liam/cli package #73

merged 5 commits into from
Nov 8, 2024

Conversation

MH4GF
Copy link
Member

@MH4GF MH4GF commented Nov 7, 2024

Created a package skeleton to satisfy the “run as CLI and output HTML” use case

@MH4GF MH4GF changed the title setup erd generator setup @liam/cli package Nov 7, 2024
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
})
Copy link
Member Author

@MH4GF MH4GF Nov 7, 2024

Choose a reason for hiding this comment

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

📝 Currently, assets can be built using vite with just this setting, but the following additional actions are required

  • Make it executable as CLI and accept SQL files as input
  • Convert SQL files to DBStructure and pass them to ERDRenderer React components
  • (Publish as npm package)

Copy link
Member Author

Choose a reason for hiding this comment

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

@hoshinotsuyoshi I would like to request this research!

import { ERDRenderer } from '@liam/erd-core'

function App() {
return <ERDRenderer />
Copy link
Member Author

Choose a reason for hiding this comment

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

📝 Proceed with React Flow implementation with this component.

@MH4GF MH4GF marked this pull request as ready for review November 7, 2024 04:50
@MH4GF MH4GF requested a review from a team as a code owner November 7, 2024 04:50
@MH4GF MH4GF requested review from hoshinotsuyoshi, FunamaYukina, junkisai and sasamuku and removed request for a team November 7, 2024 04:50
Copy link
Member

@hoshinotsuyoshi hoshinotsuyoshi left a comment

Choose a reason for hiding this comment

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

I've confirmed that pnpm install and pnpm run dev work correctly in the ./frontend directory. Just a minor note: it appears to run on http://localhost:5173/ rather than port 3000, as mentioned in ./frontend/README.md. But everything looks good to me! LGTM!

@@ -0,0 +1,29 @@
{
"name": "@liam/cli",
Copy link
Member

Choose a reason for hiding this comment

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

nits: Should we discuss whether @liam/ (scope) is the appropriate choice? In any case, I think it won’t be difficult to change this later. :)

Copy link
Member Author

Choose a reason for hiding this comment

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

This is correct, the scope needs to be considered!
There may be issues such as whether the npm organization can be reserved. I would like to discuss this later.

"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
Copy link
Member

Choose a reason for hiding this comment

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

nits:

In cli/tsconfig.node.json, should noEmit be set to false?
I thought the CLI would be provided as a .js file.
In any case, I’ll look into it on my end and make any necessary changes later if there are issues.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's right, I would need a js file to provide it as a CLI!

Copy link
Member

@junkisai junkisai left a comment

Choose a reason for hiding this comment

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

LGTM!!

@MH4GF
Copy link
Member Author

MH4GF commented Nov 8, 2024

thanks for reviews!

@MH4GF MH4GF enabled auto-merge November 8, 2024 06:36
@MH4GF MH4GF added this pull request to the merge queue Nov 8, 2024
Merged via the queue into main with commit 814a59d Nov 8, 2024
6 checks passed
@MH4GF MH4GF deleted the setup-erd-generator branch November 8, 2024 06:39
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.

3 participants