ghul.templates
0.2.8
Prefix Reserved
dotnet new install ghul.templates::0.2.8
ghūl 'dotnet new' templates
These are 'dotnet new' templates for quick-starting a .NET 8.0 console application or class library project written in the ghūl programming language.
Note that these templates do 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.
Quick start
$ dotnet new --install ghul.templates
The following template packages will be installed:
ghul.templates
Success: ghul.templates::0.0.12 installed the following templates:
Template Name Short Name Language Tags
-------------------------- ------------- -------- -------
ghūl class library package ghul-classlib ghūl Console
ghūl console application ghul-console ghūl Console
$ mkdir my-console-project
$ cd my-console-project
$ dotnet new ghul-console
The template "ghūl console application" was created successfully.
$ dotnet run
Hello world!
Prerequisites
These templates create skeleton ghūl programming language projects that can be built on any host that supports the .NET 8.0 SDK
You'll need to either install the .NET 8.0 SDK, or use a container that includes it like the ghūl development image or a recent Microsoft .NET SDK image
Recommended
- 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 templates
The templates are distributed as a NuGet package containing two .NET templates. Before you can use them, you need to install the template package:
$ dotnet new --install ghul.templates
Instantiating the templates
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 either template in your project folder:
$ dotnet new ghul-console
Or
$ dotnet new ghul-classlib
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 your ghūl application or package
ghūl applications are standard .NET applications using familiar MSBuild projects and .NET SDK commands such as dotnet build
and dotnet pack
.
Building your project
Just use the normal dotnet commands:
$ dotnet build
$ dotnet pack
And, for the console application template:
$ dotnet run
the ghūl compiler tool
The ghūl compiler is packaged as a .NET tool and can be installed either locally or globally.
Local tool install
These templates include a local tool manifest in the .config
folder which includes the compiler. This means the compiler tool will be restored automatically when you build your application, however you can also restore it manually with:
$ dotnet tool restore
To run the compiler local tool directly from the command line, use:
$ dotnet tool run ghul-compiler
ghūl v0.2.154
Global tool install
If you prefer to install the compiler globally, you can run:
$ dotnet tool install --global ghul.compiler
This will install the compiler globally allowing you to run it from any folder with
$ 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>
-
net8.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 | 327 | 4/2/2024 |
0.2.7 | 1,072 | 2/14/2024 |
0.2.6 | 454 | 2/3/2024 |
0.2.5 | 146 | 2/3/2024 |
0.2.4 | 547 | 1/19/2024 |
0.2.3 | 577 | 3/9/2022 |
0.2.2 | 409 | 12/31/2021 |
0.2.1 | 349 | 12/30/2021 |
0.2.0 | 320 | 12/28/2021 |
0.1.1 | 342 | 12/22/2021 |
0.0.14 | 345 | 12/9/2021 |
0.0.13 | 351 | 12/9/2021 |
0.0.12 | 321 | 12/9/2021 |
0.0.11 | 558 | 12/9/2021 |
0.0.10 | 594 | 12/9/2021 |
0.0.9 | 362 | 12/8/2021 |
0.0.8 | 332 | 12/8/2021 |
0.0.7 | 330 | 12/8/2021 |
0.0.6 | 361 | 12/8/2021 |
0.0.5 | 366 | 12/8/2021 |
0.0.4 | 416 | 12/8/2021 |
0.0.3 | 375 | 12/8/2021 |