grunt-nuget-pack
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -1,2 +0,4 @@ | ||
Version 1.0.1 (2014-09-05) | ||
Version 0.0.3 (2014-09-08) | ||
Added new excludes option to make it easier to exclude files/folders based on glob patterns. | ||
Version 0.0.2 (2014-09-05) | ||
First release. |
@@ -45,2 +45,3 @@ module.exports = function(grunt) { | ||
tags: "tag1 tag2 tag3", | ||
excludes: ["test/**/*.nuspec"], | ||
outputDir: "." | ||
@@ -52,2 +53,3 @@ }, | ||
{src: "lib", dest: "/content/dir2/test_lib"}, | ||
{src: "test", dest: "/content/dir2/test"} | ||
] | ||
@@ -54,0 +56,0 @@ } |
@@ -8,3 +8,3 @@ var ZipWriter = require("moxie-zip").ZipWriter; | ||
var zip = new ZipWriter(), extensions = {nuspec: true}; | ||
var propsId = "7857dbf80735479b8ee19fa60cb8239e"; | ||
var propsId = "7857dbf80735479b8ee19fa60cb8239e", excludePaths = {}; | ||
@@ -179,2 +179,10 @@ function verifyMeta() { | ||
this.addExcludes = function(excludes) { | ||
if (Array.isArray(excludes)) { | ||
excludes.forEach(function(excludePath) { | ||
excludePaths[path.resolve(excludePath)] = true; | ||
}); | ||
} | ||
}; | ||
this.addFile = function(srcPath, destPath) { | ||
@@ -184,2 +192,6 @@ function process(filePath, zipFilePath) { | ||
if (excludePaths[path.resolve(filePath)]) { | ||
return; | ||
} | ||
stat = fs.statSync(filePath); | ||
@@ -186,0 +198,0 @@ filePath = filePath.replace(/\\/g, '/'); |
{ | ||
"name": "grunt-nuget-pack", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Grunt task for creating nuget packages without using nuget.exe.", | ||
@@ -5,0 +5,0 @@ "author": "Moxiecode Systems AB <info@moxiecode.com>", |
@@ -14,8 +14,2 @@ grunt-nuget-pack | ||
#### id | ||
Type: `string` | ||
The unique identifier for the package. This is the package name that is shown when packages are listed using the Package Manager Console. These are also used when installing a package using the Install-Package command within the Package Manager Console. Package IDs may not contain any spaces or characters that are invalid in an URL. In general, they follow the same rules as .NET namespaces do. So Foo.Bar is a valid ID, Foo! and Foo Bar are not. | ||
#### version | ||
@@ -122,2 +116,8 @@ | ||
#### excludes | ||
Type: `array` | ||
Array with glob patterns to exclude from the output package. Try to make the glob pattern as exact as possible for performance reasons. | ||
#### outputDir | ||
@@ -188,2 +188,3 @@ | ||
tags: "tag1 tag2 tag3", | ||
excludes: ["js/**/*.dev.js"], | ||
outputDir: "out" | ||
@@ -190,0 +191,0 @@ }, |
@@ -21,2 +21,6 @@ var Package = require("../lib/Package"); | ||
if (target.options.excludes) { | ||
package.addExcludes(grunt.file.expand(target.options.excludes)); | ||
} | ||
this.files.forEach(function(filePair) { | ||
@@ -23,0 +27,0 @@ filePair.src.forEach(function(src) { |
18877
279
197