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(cli): detect project NPM package manager on init #10504

Merged
merged 10 commits into from
Aug 11, 2024

Conversation

fu050409
Copy link
Contributor

@fu050409 fu050409 commented Aug 6, 2024

Hi, there's duplicate interaction in command cargo tauri init (or using other package managers for init). Instead of repeatedly asking for the dev and build commands, we could just simply let the users choose which package manager they want to use and automatically select the corresponding commands. This works the same as pnpm create tauri.

Resolved: #10257

@fu050409 fu050409 requested a review from a team as a code owner August 6, 2024 11:34
@fu050409 fu050409 changed the title feat(cli): improve init behavior to ask once (fix #10257) feat(cli): improve init behavior to ask once Aug 6, 2024
Copy link
Member

@lucasfernog lucasfernog left a comment

Choose a reason for hiding this comment

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

using the create-tauri-app logic here doesn't help us since we must support more kinds of projects (CTA already knows the scripts in the project since it controls the entire project template). I would only focus on detecting the package manager and using it on the default script while still prompting the user (instead of the current npm run default)

tooling/cli/src/init.rs Outdated Show resolved Hide resolved
tooling/cli/src/init.rs Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Aug 11, 2024

Package Changes Through f6d85a6

There are 6 changes which include tauri-build with prepatch, tauri-codegen with prerelease, tauri-utils with prerelease, tauri-cli with prerelease, @tauri-apps/cli with prerelease, tauri with prerelease

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tauri-utils 2.0.0-rc.2 2.0.0-rc.3
tauri-bundler 2.0.1-rc.1 2.0.1-rc.2
tauri-runtime 2.0.0-rc.2 2.0.0-rc.3
tauri-runtime-wry 2.0.0-rc.2 2.0.0-rc.3
tauri-codegen 2.0.0-rc.2 2.0.0-rc.3
tauri-macros 2.0.0-rc.2 2.0.0-rc.3
tauri-plugin 2.0.0-rc.2 2.0.0-rc.3
tauri-build 2.0.0-rc.2 2.0.1-rc.0
tauri 2.0.0-rc.2 2.0.0-rc.3
@tauri-apps/cli 2.0.0-rc.3 2.0.0-rc.4
tauri-cli 2.0.0-rc.3 2.0.0-rc.4

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@lucasfernog lucasfernog changed the title feat(cli): improve init behavior to ask once feat(cli): detect project NPM package manager on init Aug 11, 2024
@lucasfernog lucasfernog merged commit 71d0064 into tauri-apps:dev Aug 11, 2024
10 checks passed
@fu050409 fu050409 deleted the feat/improve-cli-init branch August 12, 2024 02:42
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.

[feat] pnpm tauri init at an existing next js project
2 participants