EasyBuild.Tools

Package Description


Keywords
License
MIT
Install
Install-Package EasyBuild.Tools -Version 4.1.0

Documentation

EasyBuild.Tools

NuGet

Sponsors badge link

Tool for generating changelog based on Git history based on Conventional Commits. It is using EasyBuild.CommitParser to parse commit messages check their documentation for more information about configuration.

Contents

Installation

dotnet add package EasyBuild.Tools

APIs

Changelog

Changelog.tryFindLastVersion - Try to find the last version in a changelog file

(changelogFile: FileInfo)

snippet source | anchor

Changelog.findLastVersion - Find the last version in a changelog file or throw an error if not found

(changelogFile: FileInfo)

snippet source | anchor

ChangelogGen

ChangelogGen.run - generate changelog using EasyBuild.ChangelogGen

(
    changelogFile: string,
    ?allowDirty: bool,
    ?allowBranch: string list,
    ?tagFilter: string list,
    ?preRelease: string,
    ?config: string,
    ?forceVersion: string,
    ?skipInvalidCommit: bool,
    ?dryRun: bool,
    ?githubRepo: string,
    ?workingDirectory: string,
    ?forwardArguments: string list
)
: string

snippet source | anchor

Example

open EasyBuild.Tools.ChangelogGen

let newVersion = ChangelogGen.run "CHANGELOG.md"
ChangelogGen.tryRun - generate changelog using EasyBuild.ChangelogGen

(
    changelogFile: string,
    ?allowDirty: bool,
    ?allowBranch: string list,
    ?tagFilter: string list,
    ?preRelease: string,
    ?config: string,
    ?forceVersion: string,
    ?skipInvalidCommit: bool,
    ?dryRun: bool,
    ?githubRepo: string,
    ?workingDirectory: string,
    ?forwardArguments: string list
)
: ChangelogGenResult

snippet source | anchor

Example

open EasyBuild.Tools.ChangelogGen

match ChangelogGen.tryRun "CHANGELOG.md" with
| ChangelogGenResult.NoVersionBump ->
    printfn "Nothing to deploy"
| ChangelogGenResult.Error error ->
    failwithf "Error while generating changelog:\n%s" error
| ChangelogGenResult.NewVersion newVersion ->
    // Continue release process

DotNet

DotNet.pack - create a NuGet package

(?workingDirectory : string, ?projectFile: FileInfo, ?configuration: Configuration)
: FileInfo

snippet source | anchor

Example

open EasyBuild.Tools.DotNet

let nupkgFile = DotNet.pack()
DotNet.nugetPush - push a NuGet package to a NuGet server

(
    nupkgPath: FileInfo,
    ?forceEnglishOutput: bool,
    ?source: string,
    ?symbolSource: string,
    ?timeout: int,
    ?apiKey: string,
    ?symbolApiKey: string,
    ?disableBuffering: bool,
    ?noSymbols: bool,
    ?interactive: bool,
    ?skipDuplicate: bool,
    ?forceEcho: bool
)

snippet source | anchor

If apiKey is not provided, NUGET_KEY environment variable will be used.

If symbolApiKey is not provided, NUGET_SYMBOL_KEY environment variable will be used.

generate changelog using EasyBuild.ChangelogGen

Fable

Fable.build - run Fable compiler in build mode

(
    ?projFileOrDir: string,
    ?outDir: string,
    ?extension: string,
    ?sourceMaps: bool,
    ?sourceMapsRoot: string,
    ?define: string list,
    ?configuration: string,
    ?verbose: bool,
    ?silent: bool,
    ?typedArrays: bool,
    ?run: string,
    ?runFast: string,
    ?runScript: bool,
    ?noRestore: bool,
    ?noCache: bool,
    ?exclude: string list,
    ?lang: Fable.Lang,
    ?workingDirectory: string
)
: unit

snippet source | anchor

Fable.watch - run Fable compiler in watch mode

(
    ?projFileOrDir: string,
    ?outDir: string,
    ?extension: string,
    ?sourceMaps: bool,
    ?sourceMapsRoot: string,
    ?define: string list,
    ?configuration: string,
    ?verbose: bool,
    ?silent: bool,
    ?typedArrays: bool,
    ?run: string,
    ?runFast: string,
    ?runScript: bool,
    ?runWatch: string,
    ?noRestore: bool,
    ?noCache: bool,
    ?exclude: string list,
    ?lang: Fable.Lang,
    ?workingDirectory: string
)
: Task

snippet source | anchor

FableCssModules

FableCssModules.runAsync - run fable-css-modules in async mode

(?outFile: string, ?``internal``: bool, ?camelCase: bool, ?workingDirectory: string)
: Task

snippet source | anchor

FableCssModules.run - run fable-css-modules

(?outFile: string, ?``internal``: bool, ?camelCase: bool, ?workingDirectory: string)
: unit

snippet source | anchor

Git

Git.addAll - add all files to staging area

()

snippet source | anchor

Git.commitRelease - commit staged files with release message using conventional commit

(newVersion: string)

snippet source | anchor

Git.push - push to the remote repository

(?force: bool)

snippet source | anchor

Nodemon

Nodemon.runAsync - run nodemon in async mode

(
    // Configuration
    ?config: string,
    ?exitCrash: bool,
    ?ignore: string list,
    ?noColors: bool,
    ?signal: string,
    ?watch: string list,
    ?noUpdateNotifier: bool,
    // Execution
    ?onChangeOnly: bool,
    ?cwd: string,
    ?extensions: string,
    ?noStdin: bool,
    ?spawn: bool,
    ?exec: string,
    ?yourArgs: string,
    // Watching
    ?delay: string,
    ?legacyWatch: bool,
    ?pollingInterval: int,
    // Information
    ?dump: bool,
    ?verbose: bool,
    ?workingDirectory: string
)
: Task

snippet source | anchor

Nodemon.run - run nodemon

(
    // Configuration
    ?config: string,
    ?exitCrash: bool,
    ?ignore: string list,
    ?noColors: bool,
    ?signal: string,
    ?watch: string list,
    ?noUpdateNotifier: bool,
    // Execution
    ?onChangeOnly: bool,
    ?cwd: string,
    ?extensions: string,
    ?noStdin: bool,
    ?spawn: bool,
    ?exec: string,
    ?yourArgs: string,
    // Watching
    ?delay: string,
    ?legacyWatch: bool,
    ?pollingInterval: int,
    // Information
    ?dump: bool,
    ?verbose: bool,
    ?workingDirectory: string
)
: unit

snippet source | anchor

Npm

Npm.publish - publish a package to the npm registry

(projectDir: string, ?tag: string, ?isRestricted: bool)

snippet source | anchor

Npm.install - install npm packages

(?workingDirectory: string)

snippet source | anchor

PackageJson

PackageJson.replaceVersion - replace the version in a package.json file

(file: FileInfo, newVersion: string)

snippet source | anchor

Example

open EasyBuild.Tools.PackageJson

let packageJsonFile = FileInfo "package.json"
PackageJson.replaceVersion packageJsonFile "1.0.0"
PackageJson.getName - replace the version in a package.json file

(file: FileInfo)

snippet source | anchor

Example

open EasyBuild.Tools.PackageJson

let packageJsonFile = FileInfo "package.json"
let packageName = PackageJson.getName packageJsonFile
PackageJson.getVersion - replace the version in a package.json file

(file: FileInfo)

snippet source | anchor

Example

open EasyBuild.Tools.PackageJson

let packageJsonFile = FileInfo "package.json"
let packageVersion = PackageJson.getVersion packageJsonFile
PackageJson.needPublishing - check if a package needs to be published

(packageJson: FileInfo)
: bool

snippet source | anchor

Example

open EasyBuild.Tools.PackageJson

let packageJsonFile = FileInfo "package.json"

if PackageJson.needPublishing packageJsonFile then
    // Do something

Vercel

Vercel.pull - Pull latest environment variables and project settings from Vercel

(
    ?environment: string,
    ?gitBranch: string,
    ?yes: bool,
    ?debug: bool,
    ?globalConfig: string,
    ?localConfig: string,
    ?noColor: bool,
    ?scope: string,
    ?token: string,
    ?workingDirectory: string
)

snippet source | anchor

Vercel.build - build the project

(
    ?output: string,
    ?prod: bool,
    ?yes: bool,
    ?debug: bool,
    ?globalConfig: string,
    ?localConfig: string,
    ?noColor: bool,
    ?scope: string,
    ?token: string,
    ?workingDirectory: string
)

snippet source | anchor

Vercel.deploy - deploy your project to Vercel

(
    ?archive: string,
    ?buildEnv: string,
    ?env: string,
    ?force: bool,
    ?meta: string,
    ?noWait: bool,
    ?prebuilt: bool,
    ?prod: bool,
    ?``public``: bool,
    ?regions: string list,
    ?skipDomain: bool,
    ?withCache: bool,
    ?yes: bool,
    ?debug: bool,
    ?globalConfig: string,
    ?localConfig: string,
    ?noColor: bool,
    ?scope: string,
    ?token: string,
    ?workingDirectory: string
)

snippet source | anchor

Vite

Vite.build - build for production

(
    ?target: string,
    ?outDir: string,
    ?assetsDir: string,
    ?assetsInlineLimit: int,
    ?ssr: string,
    ?sourcemap: Vite.Build.SourceMap,
    ?minify: Vite.Build.Minifier,
    ?manifest: Vite.Build.Manifest,
    ?ssrManifest: Vite.Build.SSRManifest,
    ?emptyOutDir: bool,
    ?watch: bool,
    ?config: string,
    ?``base``: string,
    ?logLevel: Vite.Build.LogLevel,
    ?clearScreen: bool,
    ?debug: Vite.Build.Debug,
    ?filter: string,
    ?mode: string,
    ?workingDirectory: string
)

snippet source | anchor

Vite.watch - start development server

(
    ?host: string,
    ?port: int,
    ?``open``: Vite.Watch.Open,
    ?cors: bool,
    ?strictPort: bool,
    ?force: bool,
    ?config: string,
    ?``base``: string,
    ?logLevel: Vite.Watch.LogLevel,
    ?clearScreen: bool,
    ?debug: Vite.Watch.Debug,
    ?filter: string,
    ?mode: string,
    ?workingDirectory: string
)
: Task

snippet source | anchor