feat(cli.js): allow configuring tauri app path on package.json #2752#3035
feat(cli.js): allow configuring tauri app path on package.json #2752#3035lucasfernog merged 5 commits intonextfrom
Conversation
`package.json > tauri > appPath` defines the path to the tauri crate and cli.js sets the proper CWD when running cli.rs
|
if we are gonna add this, then we should probably add the other way around too. |
I think the Rust CLI won't even know about Node.js or the frontend application. Currently it only needs this information for |
yeah you're right, this makes more sense. We also had some reports about some people not able to use the rust cli with a cargo workspace but that's for another PR I guess. |
|
Can you link that issue? Last time I checked it worked fine, maybe it's some special setup. |
|
don't remember exactly, maybe it was this #2765 (comment) . |
tooling/cli.js/bin/tauri.js
Outdated
| process.argv.splice(0, 3) | ||
| } | ||
| let cwd = null | ||
| if (existsSync('package.json')) { |
There was a problem hiding this comment.
we could enhance this a bit using https://github.com/sindresorhus/pkg-up , I know I sometimes run npm clis in a nested directory. this would be a cool addition IMO.
There was a problem hiding this comment.
good idea, gonna do it tomorrow
There was a problem hiding this comment.
pkg-up is literally just calling findUp('package.json', {cwd}) from https://github.com/sindresorhus/find-up, so I'd say use find-up directly
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
package.json > tauri > appPathdefines the path to the tauri crate and cli.js sets the proper CWD when running cli.rsWhat kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
The PR fulfills these requirements:
fix: #xxx[,#xxx], where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information: