Skip to content

make codepod (cli) support /path/to/repo; publish codepod to npm #565

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

Merged
merged 3 commits into from
Oct 6, 2023

Conversation

lihebi
Copy link
Collaborator

@lihebi lihebi commented Oct 6, 2023

This is a prototype. This PR makes the codepod-cli works with the repoPath cmd-line argument.

@lihebi
Copy link
Collaborator Author

lihebi commented Oct 6, 2023

Code Updates

  • building UI package now generates in the api/public folder. This folder is uploaded into npm registry
  • yjs-setup is embedded into api/src folder to be able to compile together with api/src code
  • adjust express static assets path and UI yjsWsUrl accordingly

End result

now you can install codepod as a npm package:

> npm i -g codepod
> codepod --version
> codepod /path/to/repo
# Output: starting server ..
# html path:  /Users/hebi/.npm/_npx/aa9e62b31be6024c/node_modules/@codepod/api/build/../public
# 🚀 Server ready at http://localhost:4001

The files will be saved locally to that folder and persisted when you open codepod again.

TODOs:

  • rename package name from @codepod/api to just codepod
  • better logic to handle exiting
  • try a next port if the port is already in use.
  • figure out the proper versioning

@lihebi lihebi changed the title [prototype] make codepod-cli support /path/to/repo make codepod (cli) support /path/to/repo; publish codepod to npm Oct 6, 2023
@lihebi lihebi merged commit f03b6b0 into codepod-io:main Oct 6, 2023
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.

1 participant