Skip to content

feat(cli): add create-tauri-app - #1106

Merged
jbolda merged 13 commits into
tauri-apps:feature/create-tauri-appfrom
sanket143:create-tauri-app
Mar 7, 2021
Merged

feat(cli): add create-tauri-app#1106
jbolda merged 13 commits into
tauri-apps:feature/create-tauri-appfrom
sanket143:create-tauri-app

Conversation

@sanket143

@sanket143 sanket143 commented Dec 5, 2020

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • New Binding Issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes. Issue #___
  • No

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

Discussions:

Comments with --NOTES-- header is just for references. All comments with --NOTES-- will get cleared once it is ready.

@sanket143 sanket143 changed the title feat(cli): add create-tauri-app npm-package feat(cli): add create-tauri-app Dec 5, 2020
@sanket143

Copy link
Copy Markdown
Contributor Author

@nklayman Though it's still a little rough and hardcoded, can you tell me whether this is the right way to do it?

@sanket143

Copy link
Copy Markdown
Contributor Author

How I have thought of doing this is to have a folder recipes for init scripts of all recipes which will setup required files and directories basically the project structure. Once that's successful, it can install dependencies and stuff depending on whether it's on Deno, Node or Rust. For now, I have simply called installDependencies() in recipes/index.js because currently Tauri only supports rust for the backend but it can also be modularized.

@lucasfernog

Copy link
Copy Markdown
Member

Wouldn't that bloat the codebase? what do you think about having a separate github repo for each recipe?

@sanket143
sanket143 marked this pull request as ready for review February 20, 2021 11:25
@sanket143
sanket143 requested a review from a team as a code owner February 20, 2021 11:25
@nklayman

nklayman commented Mar 2, 2021

Copy link
Copy Markdown
Member

I'm super late but I think the recipes should all be in the same repo. There isn't much code here anyways, and we don't want to have our repo list full of tauri-template-x. It would also make releasing and issue handling more difficult.

@jbolda jbolda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for putting this together. We did want to shift over the tauri create command to this as well, but I think I can handle that. We will have a bit of overlap between the things, but I think we can pretty cleanly merge them. I will get that setup and pushed to a feature branch, and then I can get this merged into that (so leaving this open / untouched for the moment).

@jbolda

jbolda commented Mar 3, 2021

Copy link
Copy Markdown
Member

This did diverge a bit from the tauri create command, but I think it will actually still work out fine. We were also talking about pulling in degit (as that is what svelte expects as well).

I am imagining two main logical paths, and one of those splits into two as well. The first split would either be a shell command such as running create-react-app followed by a tauri init and a bit of wiring. The other path would be scaffolding / templating (which works well for vanilla js here or svelte for example). We can wire up degit to help us pull in community created templates, and then we would choose to either run it through this scaffolding that you have set up or just a copy/paste.

@nklayman

nklayman commented Mar 3, 2021

Copy link
Copy Markdown
Member

I think both need to be supported because there isn't a cli for vanilla js apps, but you can't use a template for vue-cli. Some frameworks require a template and some a cli command.

@jbolda

jbolda commented Mar 4, 2021

Copy link
Copy Markdown
Member

Ok, so it sounds like we can use the "shell out" approach for vue then?

@nklayman

nklayman commented Mar 4, 2021

Copy link
Copy Markdown
Member

Yeah, just running vue create my-app should work fine (as long as you can pipe through it's prompts, which should be solved by setting stdio to pipe).

@jbolda jbolda mentioned this pull request Mar 7, 2021
12 tasks
@jbolda
jbolda changed the base branch from dev to feature/create-tauri-app March 7, 2021 07:46
@jbolda

jbolda commented Mar 7, 2021

Copy link
Copy Markdown
Member

I rebased this onto the feature branch. I undid a bit of a wiring with the expectation to merge the code paths and wire it all back up in a follow up PR.

Thanks again @sanket143 !

@jbolda
jbolda merged commit c580338 into tauri-apps:feature/create-tauri-app Mar 7, 2021
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.

4 participants