GithubHelp home page GithubHelp logo

fabriciomurta / cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dtsudo/bridge.net-cli

0.0 2.0 0.0 711 KB

:ant: A Command Line Interface for the Bridge Compiler

Home Page: https://bridge.net

License: Apache License 2.0

C# 73.75% Batchfile 5.42% Shell 9.32% NSIS 11.50%

cli's Introduction

Bridge CLI

A Command Line Interface for the Bridge.NET compiler.

Usage

bridge [commands] [options]
bridge [options] (<name>|<path>|<list>)
bridge [-h|--help]

The following steps outline the commands for creating a new C# project using the Bridge CLI, then opening the project in Visual Studio Code, and then running your app in a web browser. Here's what we'll do:

  1. Create a new folder called Demo1 (rename to whatever you want)
  2. Move the command prompt into the folder
  3. Create a new Bridge project using the default project template
  4. Open the project in Visual Studio Code
  5. Build (compile) the project
  6. Run the app in your default web browser

Bridge CLI and Visual Studio Code must have already been installed for this sample to work. We use Visual Studio Code in this sample, but you can substitue for your editor of choice.

Example (Windows Command Prompt)

md Demo1                // Create a new folder
cd Demo1                // Move into the folder
bridge new              // Create a new project
code .                  // Open in Visual Studio Code
bridge build            // Build the project, or
bridge run              // Build and Run the index.html

Example (Mac Terminal)

mkdir Demo1             // Create a new folder
cd Demo1                // Move into the folder
bridge new              // Create a new project
code .                  // Open in Visual Studio Code
bridge build            // Build the project, or
bridge run              // Build and Run the index.html

After successfully building your project, you should see a new /dist folder in your project root. These are the Bridge generated files, including your index.html file which can be opened in a browser, or just use the bridge run command from the Windows Command line or Mac Terminal.

PRO TIP: If you're using Visual Studio Code, after opening the project you can use Ctrl + Shift + B to build your project without leaving VS Code.

Commands

Command Description
new Initialize a valid Bridge C# Class Library project.
new <template> Initialize a new project based on the named Template. Default is classlib.
build Builds the Bridge project.
run Compiles and immediately runs the index.html file.
add package <name> Add a package from NuGet.org to the project.
remove package <name> Removes a Nuget package from the project.
add repo "<path>" Add a package source location.
restore Restores all NuGet packages.

Common Options

Option Description
-h or --help Show help.
-v or --version Show version.

Options

Option Description
-c --configuration <name> Configuration name (Debug/Release etc).
-D --define <list> Semicolon-delimited list of project constants.
-f --folder <path> Builder working directory relative to current dir.
-h --help Show help.
-p --project <path> The .csproj file location.
-P --platform <name> Platform name (AnyCPU etc).
-r --rebuild Force Assembly rebuilding.
-R --recursive Recursively search for .cs source files.
-s --source <file> Source files name/pattern [default: *.cs].
-S --settings <name:value> Comma-delimited list of project settings.
-v --version Show version.
--nocore Do not extract core javascript files.
--norecursive Non-recursive search for .cs source files.
--notimestamp Do not show timestamp in log messages.

More information on getting started with Bridge.NET at https://bridge.net/docs.

cli's People

Contributors

fabriciomurta avatar geoffreymcgill avatar ozguruysal avatar

Watchers

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