Coder Social home page Coder Social logo

template's Introduction

Bolero Simple Template

Build status

This template can be used as a base to create a Bolero application.

To learn more, you can check the documentation.

Requirements

To get started, you need the following installed:

  • .NET Core SDK 3.0-preview5 or newer. Download it here.

Creating a project based on this template

To create a project based on this template, first install the template to your local dotnet:

dotnet new -i Bolero.Templates

Then, you can create a project like so:

dotnet new bolero-app -o YourAppName

This will create a project in a new folder named YourAppName.

Template options

You can use the following options to customize the project being created:

  • Project content options:

    • --minimal, -m:

      If true, the created project is a minimal application skeleton with empty content.

      If false (the default), the created project includes Bolero features such as routed pages, HTML templates and remoting.

    • --server, -s:

      If true (the default), the solution includes a Server project, which is an ASP.NET Core server that hosts the application.

      If false, the solution only contains the Client project that is compiled to WebAssembly.

      This is ignored if minimal=false, because the full-fledged project needs the server side for remoting.

    • --razor, -r:

      If true (the default if server=true), the server-side project includes a Razor page that can be configured to serve the application as client-side or server-side Blazor (learn about the difference). When the application is in Development environment, both modes are available by passing ?server=true or false in the URL.

      If false (the default and only possible value if server=false), the application is served as client-side Blazor in a plain HTML file.

    • --hotreload, -ho:

      Enable hot reloading for HTML templates.

      The default is true.

      This is ignored if server=false, because hot reloading requires a server side.

    • --pwa, -p:

      Create the client side as a progressive web app.

  • Package management options:

    • --nightly, -ni:

      Reference the nightly release of Bolero.

    • --paket, -pa:

      Use Paket for package management.

Using this template

Visual Studio Code or Visual Studio is recommended to edit this project.

To compile the project, you can run:

dotnet build

To run it:

dotnet run -p src/YourAppName.Server

# Or if you created the project with --minimal=true --server=false:
dotnet run -p src/YourAppName.Client

Project structure

  • src/YourAppName.Client is the project that gets compiled to WebAssembly, and contains your client-side code.

    • Startup.fs sets up Blazor to get the application started.

    • Main.fs contains the main body of the page.

  • src/YourAppName.Server is the host ASP.NET Core application, and contains your server-side code.

Learn more about Bolero

To learn more about Bolero, you can check the documentation.

template's People

Contributors

tarmil avatar zakaluka avatar ctaggart avatar granicz avatar kojo12228 avatar adix7 avatar offline24 avatar pver avatar liminiens avatar

Watchers

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