Skip to content

Init template can define a project kind which decide if dependencies are added to peer or regular dependencies #6923

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented Apr 9, 2025

fix #6602

@microsoft-github-policy-service microsoft-github-policy-service bot added the compiler:core Issues for @typespec/compiler label Apr 9, 2025
Copy link
Contributor

github-actions bot commented Apr 9, 2025

All changed packages have been documented.

  • @typespec/compiler
Show changes

@typespec/compiler - feature ✏️

Init templates can define a project kind which decide if dependencies are added to peer or regular dependencies

* For example, a library will add dependencies to `peer` and `dev` dependencies, while a project will add them to `dependencies`.
* @default "project"
*/
target?: "library" | "project";
Copy link
Member Author

Choose a reason for hiding this comment

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

open to different name or a different approach (more specialized), thought of

  • kind
  • preset
  • usePeerDependencies for a more specialized option but I would prefer to keep it more generic instead of adding a million tiny knobs

@azure-sdk
Copy link
Collaborator

azure-sdk commented Apr 9, 2025

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:core Issues for @typespec/compiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Don't output peer and dev dependencies when I'm not building a tsp library or emitter
2 participants