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

Support for content items #124

Open
NickDarvey opened this issue Nov 11, 2021 · 1 comment
Open

Support for content items #124

NickDarvey opened this issue Nov 11, 2021 · 1 comment
Labels
enhancement good first issue Issue for new contributors

Comments

@NickDarvey
Copy link

NickDarvey commented Nov 11, 2021

Is your feature request related to a problem? Please describe.

When using Fable, you might want to include content items along with your source code such as TypeScript declarations such that when you run dotnet fable, the specified output directory contains the compiled code (JavaScript) and the content (TypeScript declarations).

Describe the solution you'd like

Support Content as a type of ProjectItem.

Describe alternatives you've considered

  1. Using a script to include the content as a secondary step.
    This is a totally reasonable workaround and I would understand if this is how you justify a 'nope'.
    However, Fable emits each referenced project into their own folder and it would be delightful for content to be placed into their respective folders without needing to specify it.

Additional context

  1. Fable's compiler uses proj-info
  2. This would require an update to Fable too.
@baronfel
Copy link
Collaborator

I think that's a fine idea! The set of known/supported ProjectItem is definitely not exhaustive, and is meant to be expanded on as users need them, so I'd definitely be in favor of adding them. Would you be willing to contribute this change? In the interests if maximum forwards-compat I might even suggest expanding the definition of ProjectItem to be something like:

type ProjectItem = 
| Compile of name: string * fullpath: string
| Content of name: string * fullpath: string
| Unknown of tag: string * name: string * fullpath: string

as a catch-all to prevent callers of this API from being blocked in the future.

@TheAngryByrd TheAngryByrd added enhancement good first issue Issue for new contributors labels Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue Issue for new contributors
Projects
None yet
Development

No branches or pull requests

3 participants