https://github.com/terribledev/gulp-nuget-restore
restore nugets with ease through gulp
https://github.com/terribledev/gulp-nuget-restore
Last synced: 10 months ago
JSON representation
restore nugets with ease through gulp
- Host: GitHub
- URL: https://github.com/terribledev/gulp-nuget-restore
- Owner: TerribleDev
- License: mit
- Created: 2016-02-05T00:59:16.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-01-10T21:52:19.000Z (over 2 years ago)
- Last Synced: 2025-09-13T14:56:45.531Z (10 months ago)
- Language: JavaScript
- Size: 5.01 MB
- Stars: 1
- Watchers: 2
- Forks: 5
- Open Issues: 8
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# gulp-nuget-restore [](https://travis-ci.org/tparnell8/gulp-nuget-restore)
> This is simple gulp plugin to restore nuget packages
## Install
```
$ npm install --save-dev gulp-nuget-restore
```
## Usage
```js
var gulp = require('gulp');
var nugetRestore = require('gulp-nuget-restore');
gulp.task('default', function () {
return gulp.src('./path/to/MySlnFile.sln')
.pipe(nugetRestore());
});
```
Seems work well well with [gulp-msbuild](https://github.com/hoffi/gulp-msbuild)
```js
var gulp = require('gulp');
var nugetRestore = require('gulp-nuget-restore');
var msbuild = require("gulp-msbuild");
gulp.task('build', function () {
return gulp.src('WebApplication9.sln')
.pipe(nugetRestore())
.pipe(msbuild({
targets: ['Clean', 'Build'],
toolsVersion: 14.0}
));
});
```
## API
### nugetRestore(options)
#### options
##### nugetPath
Type: `string`
Default: `__dir + ./nuget.exe`
You can provide a custom path to the nuget executable. One is bundled in the module so this is optional if you want a specific version
##### monoPath
Type: `string`
Default: `null`
You can provide a path to mono if you are on ubuntu (currently untested)
#### additionalArgs
type `array`
Default: `null`
You can provide additional arguments such as -PackageDirectory
```js
var gulp = require('gulp');
var nugetRestore = require('gulp-nuget-restore');
gulp.task('default', function () {
return gulp.src('./path/to/MySlnFile.sln')
.pipe(nugetRestore({additionalArgs: ["-PackagesDirectory", "..\\packages"]}));
});
```
## License
MIT © [Tommy Parnell](https://github.com/tparnell8)