-
Notifications
You must be signed in to change notification settings - Fork 10
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: .NET Support #73
Conversation
@campionfellin can you take a quick look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job. Looks great.
README.md
Outdated
|
||
```ts | ||
await srcmak('srcdir', { | ||
dotnet: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd go with csharp
here since this is producing source code and not a library (like Pacmak)
} | ||
} | ||
", | ||
"Hello.World/dotnetpackage-0.0.0.tgz": "� �X�o�H�g� |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be included in the snapshot
const reldir = options.csharp.namespace; | ||
const source = path.resolve(path.join(workdir, 'dist/dotnet/', reldir)); | ||
const target = path.join(options.csharp.outdir, reldir); | ||
await fs.move(source, target, { overwrite: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does dotnet
package dependencies work? Just wondering if we should do it similarly to java with:
await ncp(source, target, { clobber: false });
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes sense as is since each module generates a standalone project. Applications would then have project dependencies on the generated projects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
LGTM! |
Adds support for generating a .NET (C#) project.
I choose
namespace
rather thanpackage
since it seemed more appropriate when generating source code.I went with
dotnet
since it matches the jsii naming, butcsharp
may make more sense for configuration options / cli parameters. I don't believe there are any plans to generate F# code in jsii, but if there were, I'd lean towards usingcsharp
naming.