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

CLI Publish Command & Scaffolding #1

Merged
merged 9 commits into from
Dec 31, 2023
Merged

CLI Publish Command & Scaffolding #1

merged 9 commits into from
Dec 31, 2023

Conversation

crutchcorn
Copy link
Member

This PR:

  • Introduces Liftoff to support config files, including CJS & ESM
    • Adds support for TS config files using esbuild
  • Introduces Commander to support specific CLI commands, help command, and more.
  • Exports ESM-only (no CJS support) programatic usage of the publish script
  • Adds a "bin" flag to package.json so npx and other scripts can call tanstack-config to run things
  • Writes initial docs

Screenshots

image image

"main": "build/legacy/index.cjs",
"module": "build/legacy/index.js",
"types": "src/index.d.ts",
"module": "src/index.js",
Copy link
Member

Choose a reason for hiding this comment

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

I would suggest we don't add this. It's not used by Node, and all modern bundlers (which we will be using) also read "exports".

"main": "build/legacy/index.cjs",
"module": "build/legacy/index.js",
"types": "src/index.d.ts",
"module": "src/index.js",
"exports": {
".": {
Copy link
Member

Choose a reason for hiding this comment

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

Should we just use "./publish" instead?

Copy link
Member

@lachlancollins lachlancollins left a comment

Choose a reason for hiding this comment

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

Oh this is GOOD. Just checking, would running tanstack-config without args work? Or do you need to pass in a --config? I also really like you can run the function without the CLI too!

@crutchcorn
Copy link
Member Author

If you run tanstack-config without any args it will search the CWD of the command and find tanstack.config.{js,ts} and resolve that way

Just wanted to provide more than one option, especially since the tools I selected support it

# Conflicts:
#	package.json
#	pnpm-lock.yaml
@crutchcorn crutchcorn merged commit 43925c4 into main Dec 31, 2023
1 check passed
@crutchcorn crutchcorn deleted the cli-support branch December 31, 2023 10:07
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.

2 participants