-
Notifications
You must be signed in to change notification settings - Fork 1
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
new cli #79
new cli #79
Conversation
6cc80b1
to
34f516b
Compare
- `@types/node` for bin/cli.ts - move vite to dependencies from devDependencies
- Fixed TS5111 error: "Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'." - Added `"incremental": true` to both `tsconfig.app.json` and `tsconfig.node.json` to ensure TypeScript incremental builds are enabled.
- Added `"outDir": "dist"` to `tsconfig.app.json` to define the output directory for compiled web application files. - Added `"outDir": "dist-cli"` and set `"noEmit": false` in `tsconfig.node.json` to enable emitting compiled files for the CLI. - Updated `tsconfig.node.json` to include `bin` in the `include` paths for TypeScript compilation.
- Added `liam-cli` implementation using `commander` to run `build`, `dev`, and `preview` commands. - Implemented SQL file preprocessing that converts `.sql` content to JSON and outputs it in the `public/schema.json`. - Configured Vite options in `bin/cli.ts` for building and previewing the web application. - Added `fixtures/input.sql` as a sample SQL file for testing. - Updated `.gitignore` to exclude `dist-cli` and `public/schema.json`. - Updated `package.json`: - Added `bin` configuration to expose `liam-cli`. - Defined npm scripts for building and running the CLI. - Added a placeholder `.keep` file in the `public` directory.
- Added state and useEffect hook to fetch and display `/schema.json` content. - Rendered the file content inside a styled <pre> tag for demonstration.
34f516b
to
7bcd8d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!!
I only check the README and commented on it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice README! 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I followed the instructions in the README and was able to successfully test the build, dev, and preview commands, as well as the liam command in my local environment. 👍Thank you for your support!
Resolved the conflict with #84 by aligning the changes made in this commit. I've confirmed that everything mentioned under |
Conflicts: frontend/packages/cli/.gitignore frontend/packages/cli/package.json frontend/pnpm-lock.yaml
1f9e8f7
to
d10fbcc
Compare
Summary
This PR introduces a new CLI tool called
liam
that wraps Vite commands (build
,dev
, andpreview
). It includes a preprocessing feature for.sql
files, converting them into a JSON format and saving them in thepublic
directory.Related Issue
N/A
Changes
liam
CLI Tool:bin/cli.ts
usingcommander
for command-line interface functionality.runPreprocess
function to read.sql
files and convert them toschema.json
in thepublic
directory.fixtures/input.sql
as a sample input for CLI testing..gitignore
:dist-cli
andpublic/schema.json
to the ignore list.package.json
:bin
entry forliam
.commander
and@types/commander
as dependencies.dist-cli
as the output directory.App.tsx
:schema.json
asynchronously and display the content in the UI.<pre>
tag for demo purposes in App.tsxTesting
1. Verifying CLI Functionality
# Enable `liam` command. $ pnpm run build:cli $ pnpm link --global
I confirmed that Preview server is running at http://localhost:4173 ✓
2. Verifying npm Scripts
I confirmed that Preview server is running at http://localhost:4173 ✓ .
(Note: Running $ pnpm run build will display the contents of fixtures/input.sql.)
I confirmed that Dev server is running at http://localhost:5173 ✓ .
HMR is worked ✓.