@charlietango/nuget

7.0.0 • Public • Published

NuGet task

Package and publish a NuGet package to a custom feed. This is built for our specific needs on our own internal projects.

Requirements

  • Node 8.x+
  • Mono - For Mac/Linux

Usage

Add the dependency

yarn add @charlietango/nuget --dev

Build your static project into a build directory dist/static, and package it with the Node API:

const nuget = require('@charlietango/nuget');

nuget({
  files: 'dist',
  output: 'output',
});

or calling the bin

$ ct-nuget dist -o output

The NuGet will be packaged and pushed to the feed.

Structure

To avoid polluting the .NET projects, all the files in the NuGet package should be contained in a directory. By default we are using the static directory inside dist dist. Once the NuGet package is installed, a shell script will copy all the files into the project

Config

Name Type Default Description
name string name from package.json
packageId string dk.charlietango.{upperFirst(camelCase(name))} Valid packageId
version string version from package.json Valid semver version string
files glob dist in project root The directories and files to add.
rootDir string dist The root directory. This will be removed from all the paths.
globOptions Object {ignore: ['**/index.html']}
author string 'Charlie Tango'
iconUrl string https://ct-assets.netlify.com/React_logo-64.png
description string description from package.json
apiKey string process.env.NUGET_API_KEY
nugetFeed string process.env.NUGET_FEED
output string Copy the .nupkg file to this directory
cache string node_modules/.cache/nuget Temp directory to use when building
legacyInstall boolean false Don't add the powershell tools to copy files into the project after install, and instead use the special "content" directory
quiet boolean false

Readme

Keywords

none

Package Sidebar

Install

npm i @charlietango/nuget

Weekly Downloads

50

Version

7.0.0

License

MIT

Unpacked Size

5.76 MB

Total Files

11

Last publish

Collaborators

  • thebuilder
  • frederik_bosch