Coder Social home page Coder Social logo

scriptmaster / bridge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benitojedai/bridge

1.0 3.0 0.0 75.31 MB

:spades: C# to JavaScript compiler. Write modern mobile and web apps in C#. Run them anywhere in JavaScript with Bridge.NET.

Home Page: http://bridge.net

License: Apache License 2.0

JavaScript 62.35% C# 37.44% PowerShell 0.01% Batchfile 0.01% Shell 0.01% HTML 0.03% CSS 0.08% TypeScript 0.07%

bridge's Introduction

Bridge.NET logo

Build status Build Status NuGet Status Join the chat at https://gitter.im/bridgedotnet/Bridge

Bridge.NET is an open source C#-to-JavaScript Compiler. Write your application in C# and run on billions of devices.

Compile your C#...

public class Program
{
    public static void Main()
    {
        var msg = "Hello, World!";
        
        Console.WriteLine(msg);
    }
}

into JavaScript

Bridge.define("Demo.Program", {
    main: function Main () {
        var msg = "Hello, World!";

        System.Console.WriteLine(msg);
    }
});

Run the sample above at Deck.NET.

TL;DR

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.

Video Tutorial

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....

Bridge for Visual Studio

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.

Visual Studio Extensions and Updates

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.

Built with Bridge.NET

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:

  1. Add a Badge
  2. Star the Bridge project on GitHub
  3. Leave a review at Visual Studio Gallery
  4. Blog about Bridge.NET
  5. Tweet about @bridgedotnet
  6. Start a discussion on Reddit or Hacker News
  7. Answer Bridge related questions on StackOverflow
  8. Give a local usergroup presentation on Bridge
  9. Give a conference talk on Bridge
  10. Provide feedback (forums, GitHub or email)
  11. Vote for Bridge.NET on UserVoice

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.

bridge's People

Contributors

andrewharry avatar andreychechel avatar danielku15 avatar daniilveriga avatar deniskyashif avatar dim0n22 avatar fabriciomurta avatar geoffreymcgill avatar gitter-badger avatar glaanc03 avatar gogglespisano avatar kcudnik avatar michaelcheers avatar ozguruysal avatar phrohdoh avatar productiverage avatar razenpok avatar terribledev avatar tinkerworx avatar txdv avatar vladimir-scheglov avatar vladsch avatar waffle-iron avatar wind39 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.