CSharpToJs.Core
0.2.0
dotnet add package CSharpToJs.Core --version 0.2.0
NuGet\Install-Package CSharpToJs.Core -Version 0.2.0
<PackageReference Include="CSharpToJs.Core" Version="0.2.0" />
paket add CSharpToJs.Core --version 0.2.0
#r "nuget: CSharpToJs.Core, 0.2.0"
// Install CSharpToJs.Core as a Cake Addin #addin nuget:?package=CSharpToJs.Core&version=0.2.0 // Install CSharpToJs.Core as a Cake Tool #tool nuget:?package=CSharpToJs.Core&version=0.2.0
C# to JS
Used for converting C# models and DTOs to javascript classes
A global .NET Core tool to easily convert C# models and classes into Javascript classes
C# Input JS output
Installation
Install the tool
dotnet tool install --global CSharpToJs
Update .csproj
Update your project to output all its dependencies by adding <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
to your .csproj
file for the project you're running the tool for. This is so the CSharpToJs tool can resolve any dependencies used, e.g. Nuget packages.
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
Create a configuration file
Add a csharptojs.config.json
. I'd recommend the project's root folder but you can place it wherever you want. By default, the tool will look in the folder in which you're executing the tool in but also accepts a path (excl. filename) to the config file. Note that any relative paths in the config will be relative to where the tool is being executed, not where the config file is.
See Usage for details.
Usage
Simple
Simply execute csharptojs
in the command line without any arguments. The csharptojson.config.json
will be read from the folder where the tool is being executed.
$ csharptojs
With path to config
The first, and only, argument is the path to the config file, without the filename.
E.g. c:/config/a-folder/csharptojson.config.json
would be:
$ csharptojs c:/config/a-folder
Configuration file
Docs in progress. See example in Samples or definition file
Release History
0.2.0
- [JsIgnore] attribute added
0.1.0
- First initial release
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- JetBrains.Annotations (>= 2019.1.3)
- Newtonsoft.Json (>= 12.0.2)
- NuGet.Configuration (>= 5.1.0)
- System.Memory (>= 4.5.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.