0.5.5 • Published 9 years ago

grunt-nugetter v0.5.5

Weekly downloads
1
License
-
Repository
github
Last release
9 years ago

grunt-nugetter

Download nuget packages

Getting Started

This plugin requires Grunt ~0.4.5

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-nugetter --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-nugetter');

The "nugetter" task

Overview

In your project's Gruntfile, add a section named nugetter to the data object passed into grunt.initConfig().

grunt.initConfig({
  nugetter: {
    options: {
      // Task-specific options go here.
    }
  },
});

Options

options.id

Type: String Default value: ''

The id of the nuget package you want to download.

options.version

Type: String Default value: ''

The optional version you would like to download. If not given, downloads latest.

options.server

Type: String Default value: 'http://nuget.org/api/v2/'

Allows you to point to internal nuget server.

options.dest

Type: String Default value: '%(id)s.zip'

Where the unzipped files should be stored. Option supports referencing other options as a named parameter.

options.tmp

Type: String Default value: '%(id)s.zip'

Where the package sholud be temporarily stored. Option supports referencing other options as a named parameter. File is automatically deleted if tmpDelete is true.

options.tmpDelete

Type: Boolean Default value: true

Whether the temporary package is automatically deleted.

Usage Examples

Default Options

This is the most basic example, using default locations and server to download the jQuery NuGet package.

grunt.initConfig({
  nugetter: {
    options: {
      packages: [
        {
          id: 'jQuery'
        }
      ]
    }
  }
});

Custom Options

This example shows how to use a custom server, custom destination, and multiple packages.

grunt.initConfig({
  nugetter: {
    options: {
      packages: [
        {
          id: 'jQuery'
        },
        {
          id: 'CustomPackage',
          dest: '_source/nuget/%(id)s'
          server: 'http://my-custom-server/api/'
        }
      ]
    }
  },
});
0.5.5

9 years ago

0.5.4

10 years ago

0.5.3

10 years ago

0.5.2

10 years ago

0.5.1

10 years ago

0.5.0

10 years ago

0.4.0

10 years ago

0.3.0

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago