Loic.bridgedotnet.Bridge
1.0.0
dotnet add package Loic.bridgedotnet.Bridge --version 1.0.0
NuGet\Install-Package Loic.bridgedotnet.Bridge -Version 1.0.0
<PackageReference Include="Loic.bridgedotnet.Bridge" Version="1.0.0" />
paket add Loic.bridgedotnet.Bridge --version 1.0.0
#r "nuget: Loic.bridgedotnet.Bridge, 1.0.0"
// Install Loic.bridgedotnet.Bridge as a Cake Addin #addin nuget:?package=Loic.bridgedotnet.Bridge&version=1.0.0 // Install Loic.bridgedotnet.Bridge as a Cake Tool #tool nuget:?package=Loic.bridgedotnet.Bridge&version=1.0.0
<p align="center"><img src="https://user-images.githubusercontent.com/62210/29276839-1759fbe8-80cd-11e7-921c-d509e0e2a22c.png"></p>
Bridge.NET is an open source C#-to-JavaScript Compiler. Write your application in C# and run on billions of devices.
Write in C#. Run in a Web Browser.
<table> <tr><td align="center" width="50%">C#</td><td></td><td align="center" width="50%">JavaScript</td></tr> <tr> <td> <pre lang="csharp"> public class Program { public static void Main() { var msg = "Hello, World!";
Console.WriteLine(msg);
}
} </pre> </td> <td><h1>⇨</h1></td> <td> <pre lang="javascript"> Bridge.define("Demo.Program", { main: function Main () { var msg = "Hello, World!";
System.Console.WriteLine(msg);
}
}); </pre> </td> </tr> </table>
Run the sample above at Deck.NET.
TL;DR
- Read the Getting Started Knowledge Base article
- Try Deck if you want to play
- Installation:
- The Attribute Reference documentation is important
- The Global Configuration documentation is important
- Check out Retyped for 2400+ supported libraries (demos)
- Licensed under Apache License, Version 2.0
- Need Help? Bridge.NET Forums or GitHub Issues
- @bridgedotnet on Twitter
- Gitter for messaging
Getting Started
A great place to start if you're new to Bridge is reviewing the Getting Started wiki.
The easiest place to see Bridge in action is Deck.NET.
Sample
The following code sample demonstrates a simple App.cs class that will run automatically on page load and write a message to the Bridge Console.
Example (Deck)
public class Program
{
public static void Main()
{
Console.WriteLine("Hello World!");
}
}
The C# class above will be compiled into JavaScript and added to /Bridge/ouput/demo.js within your project. By default, Bridge will use the Namespace name as the file name. In this case: demo.js. There are many options to control the output of your JavaScript files, and the Attribute Reference is important documentation to review.
Bridge.define("Demo.Program", {
main: function Main() {
System.Console.WriteLine("Hello World!");
}
});
Installation
A full list of installation options available at bridge.net/download/, including full support for Visual Studio and Visual Studio Community on Windows, and Visual Studio Mac.
Bridge for Visual Studio
If you're using Visual Studio for Windows, the easiest way to get started is by adding the Bridge.NET for Visual Studio extension.
From within Visual Studio, go to the Tools > Extensions and Updates...
.
From the options on the left side, be sure to select Online, then search for Bridge. Clicking Download will install Bridge for Visual Studio. After installation is complete, Visual Studio may require a restart.
Once installation is complete you will have a new Bridge.NET project type. When creating new Bridge enabled projects, select this project type.
NuGet
Another option is installation of Bridge into a new C# Class Library project using NuGet. Within the NuGet Package Manager, search for Bridge and click to install.
Bridge can also be installed using the NuGet Command Line tool by running the following command:
Install-Package Bridge
More information regarding Nuget package installation for Bridge is available in the Documentation.
Contributing
Interested in contributing to Bridge? Please see CONTRIBUTING.md.
We also flag some Issues as up-for-grabs. These are generally easy introductions to the inner workings of Bridge, and are items we just haven't had time to implement. Your help is always appreciated.
Badges
Show your support by adding a built with Bridge.NET badge to your projects README or website.
Markdown
[![Built with Bridge.NET](https://img.shields.io/badge/built%20with-Bridge.NET-blue.svg)](http://bridge.net/)
HTML
<a href="http://bridge.net/">
<img src="https://img.shields.io/badge/built%20with-Bridge.NET-blue.svg" title="Built with Bridge.NET" />
</a>
How to Help
We need your help spreading the word about Bridge. Any of the following items will help:
- Star the Bridge project on GitHub
- Add a Badge
- Leave a review at Visual Studio Gallery
- Blog about Bridge.NET
- Tweet about @bridgedotnet
- Start a discussion on Reddit or Hacker News
- Answer Bridge related questions on StackOverflow
- Give a local usergroup presentation on Bridge
- Give a conference talk on Bridge
- Provide feedback (forums, GitHub or email)
Testing
Bridge is continually tested with the full test runner available at http://testing.bridge.net/.
Credits
Bridge is developed by the team at Object.NET. Frameworks and Tools for .NET Developers.
License
Apache License, Version 2.0
Please see LICENSE for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. 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. |
-
net5.0
- No dependencies.
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 |
---|---|---|
1.0.0 | 0 | 7/31/2021 |