CSharpToJs.Core 0.2.0

dotnet add package CSharpToJs.Core --version 0.2.0
NuGet\Install-Package CSharpToJs.Core -Version 0.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CSharpToJs.Core" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CSharpToJs.Core --version 0.2.0
#r "nuget: CSharpToJs.Core, 0.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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 alternate text is missing from this package README image JS output alternate text is missing from this package README image

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.2.0 1,629 7/16/2019
0.1.0 479 7/14/2019