Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Usage

import * as mod from "https://garn.io/ts/v0.0.14/mod.ts";

§Namespaces

go
haskell
javascript
nix

§Variables

editGarnConfig

This is an Executable that will open a new vscodium editor that is preconfigured to provide a pleasant editing experience for garn.ts files.

emptyEnvironment

The empty environment - this Environment has nothing installed in it. It can be easily extended using withDevTools.

§Functions

build

Creates a new Package, which will be built using the given shell script. It's run in the emptyEnvironment.

check

Creates a new shell script Check, run in the emptyEnvironment.

go.mkGoProject

Creates a go-based garn Project.

haskell.mkHaskellProject

Creates a haskell-based garn Project.

javascript.mkNpmProject

Creates a npm-based garn Project.

javascript.mkYarnProject

Creates a yarn-based garn Project.

mkEnvironment

A low-level helper to create new Environments from NixExpressions.

mkPackage

A low-level helper to create new Packages from NixExpressions.

mkProject

Creates a new Project.

nix.nixAttrSet

Turns a javascript object of NixExpressions into a Nix attribute set.

nix.nixList

Turns a javascript array of NixExpressions into a Nix list.

nix.nixRaw

A template literal function to construct NixExpressions from raw strings.

nix.nixStrLit

Returns a NixExpression which represents a Nix string literal, but with all typescript interpolations properly escaped and interpolated.

processCompose

Creates an executable project that runs all specified executables simultaneously using process-compose.

shell

Creates a new shell script Executable, run in the emptyEnvironment.

§Type Aliases

Check

Checks are commands (usually shell commands) that are used to define reproducible automated tests or other checks.

Environment

Environments define what files and tools are available to Executables, Checks and development shells.

Executable

Executables are commands (usually shell snippets) that are being run on your local machine (not in a sandbox).

nix.NixExpression

An opaque type representing a Nix expression.

nix.NixStrLitInterpolatable

A union of types that are allowed to be interpolated into the nixStrLit template literal function. This is also used in some higher level functions, such as Environment.shell.

Package

Packages are instructions to garn about how to build a set of files.

Project

A Project is a logical grouping of Packages and Environments. For example, you may have a 'frontend' Project, a 'backend' Project, a 'cli' Project, etc.