ghul.templates 0.0.6

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet new install ghul.templates::0.0.6                
This package contains a .NET Template Package you can call from the shell/command line.

ghūl console application template

This is a 'dotnet new' template for quick-starting a .NET 6.0 console application project written in the ghūl programming language.

Note that this template does not include things like GitHub Actions workflows, development container config, Dependabot config, unit tests, etc. For a GitHub repository template that does include all those things, see the ghūl repository template repo.

CI/CD status

CI/CD

Package

ghul.templates

Prerequisites

This template will create a skeleton ghūl application that can be built on any host that supports the .NET 6.0 SDK, including any of:

You'll need to install the .NET 6.0 SDK or, for the Docker options, make sure you're using an image that includes it (try the ghūl development image or the Microsoft .NET SDK image)

  • Visual Studio Code
  • The ghūl language Visual Studio Code extension, which will give you rich
    • language support including:
    • syntax highlighting
    • error highlighting as you type
    • code snippets
    • symbol information on hover
    • intelligent code completion
    • function signature help
    • find uses
    • go to/peek definition
    • go to symbol in file
    • go to symbol in workspace

Installing the template

The template is distributed as a NuGet package containing a .NET template. Before you can use it, you need to install the template package:

$ dotnet new --install ghul.templates

Instantiating the template

Start by creating a new folder for your project and cd into it

$ mkdir example
$ cd example

Then use dotnet new to initialize a new instance of this template in your project folder:

$ dotnet new ghul-console

This will create a .ghulproj MSBuild project file, a .ghul source file and some other supporting files:

$ find

./src
./src/example.ghul
./src/README.md
./README.md
./.config
./.config/dotnet-tools.json
./.vscode
./.vscode/tasks.json
./example.ghulproj

Building the template application

ghūl applications are standard .NET applications using familiar MSBuild projects and .NET SDK commands such as dotnet build and dotnet pack. However, before these commands will work, you do need to install the ghūl compiler

Installing the ghūl compiler

(If you're developing in a container using the ghūl development Docker image then you can skip this step)

The ghūl compiler is packaged as a .NET tool and can be installed either locally or globally.

Local tool install

This template includes a local tool manifest in the .config folder which includes the compiler, so you can install the compiler locally simply by restoring local tools:

$ dotnet tool restore

Note: if you're using Visual Studio Code and the ghūl extension, the extension will do this for you automatically when you open the project folder

Global tool install

If you prefer to install the compiler globally, you can run:

$ dotnet tool install --global ghul.compiler

Note: if you do install the compiler globally, you will also need to change the GhulCompiler property in your .ghulproj file to reference it:

    <GhulCompiler>ghul-compiler</GhulCompiler>

Building and running the application

Just use the normal dotnet commands:

$ dotnet build
$ dotnet pack
$ dotnet run

etc. etc.

In Visual Studio Code, run the default build task (<ctrl> + <shift> + B and select build) is set up to run dotnet build

  • net6.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
0.2.8 328 4/2/2024
0.2.7 1,073 2/14/2024
0.2.6 455 2/3/2024
0.2.5 147 2/3/2024
0.2.4 548 1/19/2024
0.2.3 578 3/9/2022
0.2.2 410 12/31/2021
0.2.1 350 12/30/2021
0.2.0 321 12/28/2021
0.1.1 343 12/22/2021
0.0.14 346 12/9/2021
0.0.13 354 12/9/2021
0.0.12 322 12/9/2021
0.0.11 559 12/9/2021
0.0.10 595 12/9/2021
0.0.9 363 12/8/2021
0.0.8 333 12/8/2021
0.0.7 331 12/8/2021
0.0.6 362 12/8/2021
0.0.5 367 12/8/2021
0.0.4 419 12/8/2021
0.0.3 376 12/8/2021