grunt-contrib-lib
Advanced tools
Comparing version 0.2.0 to 0.2.1
10
grunt.js
@@ -6,3 +6,3 @@ module.exports = function(grunt) { | ||
lint: { | ||
all: ["grunt.js", "lib/*.js"] | ||
all: ["grunt.js", "lib/*.js", '<config:test.tasks>'] | ||
}, | ||
@@ -25,6 +25,12 @@ | ||
} | ||
}, | ||
// Unit tests. | ||
test: { | ||
tasks: ['test/*_test.js'] | ||
} | ||
}); | ||
grunt.registerTask("default", "lint"); | ||
// By default, lint and run all tests. | ||
grunt.registerTask('default', 'lint test'); | ||
}; |
@@ -29,2 +29,21 @@ /* | ||
exports.getNamespaceDeclaration = function(ns) { | ||
var output = []; | ||
var curPath = 'this'; | ||
if (ns !== 'this') { | ||
var nsParts = ns.split('.'); | ||
nsParts.forEach(function(curPart, index) { | ||
if (curPart !== 'this') { | ||
curPath += "["+JSON.stringify(curPart)+"]"; | ||
output.push(curPath + ' = ' + curPath + ' || {};'); | ||
} | ||
}); | ||
} | ||
return { | ||
namespace: curPath, | ||
declaration: output.join('\n') | ||
}; | ||
}; | ||
// TODO: ditch this when grunt v0.4 is released | ||
@@ -31,0 +50,0 @@ // Temporary helper for normalizing files object |
{ | ||
"name": "grunt-contrib-lib", | ||
"description": "Common functionality shared across grunt-contrib tasks.", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"homepage": "http://github.com/gruntjs/grunt-contrib-lib", | ||
@@ -26,3 +26,9 @@ "author": { | ||
}, | ||
"scripts": { | ||
"test": "grunt test" | ||
}, | ||
"devDependencies": { | ||
"grunt": "~0.3.15" | ||
}, | ||
"main": "lib/contrib" | ||
} | ||
} |
# grunt-contrib-lib | ||
> Common functionality shared across grunt-contrib tasks. | ||
> Common functionality shared across grunt-contrib tasks. | ||
## Release History | ||
* 2012/08/14 - v0.2.1 - Non-destuctive namespace declarations | ||
* 2012/08/10 - v0.2.0 - Refactored from grunt-contrib into individual repo. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
8431
8
163
7
0
1