yeoman-environment
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -245,7 +245,8 @@ 'use strict'; | ||
* | ||
* @param {Function} Generator - A Generator constructor or a simple function | ||
* @param {String} namespace - Namespace under which register the generator | ||
* @param {Function} Generator - A Generator constructor or a simple function | ||
* @param {String} namespace - Namespace under which register the generator | ||
* @param {String} [resolved] - The file path to the generator | ||
* @return {this} | ||
*/ | ||
registerStub(Generator, namespace) { | ||
registerStub(Generator, namespace, resolved) { | ||
if (typeof Generator !== 'function') { | ||
@@ -259,3 +260,3 @@ return this.error(new Error('You must provide a stub function to register.')); | ||
this.store.add(namespace, Generator); | ||
this.store.add(namespace, Generator, resolved); | ||
@@ -262,0 +263,0 @@ return this; |
@@ -18,6 +18,7 @@ 'use strict'; | ||
* Store a module under the namespace key | ||
* @param {String} namespace - The key under which the generator can be retrieved | ||
* @param {String|Function} generator - A generator module or a module path | ||
* @param {String} namespace - The key under which the generator can be retrieved | ||
* @param {String|Function} generator - A generator module or a module path | ||
* @param {String} [resolved] - The file path to the generator (used only if generator is a module) | ||
*/ | ||
add(namespace, generator) { | ||
add(namespace, generator, resolved) { | ||
if (typeof generator === 'string') { | ||
@@ -28,3 +29,3 @@ this._storeAsPath(namespace, generator); | ||
this._storeAsModule(namespace, generator); | ||
this._storeAsModule(namespace, generator, resolved); | ||
} | ||
@@ -48,5 +49,5 @@ | ||
_storeAsModule(namespace, Generator) { | ||
_storeAsModule(namespace, Generator, resolved = 'unknown') { | ||
this._meta[namespace] = { | ||
resolved: 'unknown', | ||
resolved, | ||
namespace | ||
@@ -53,0 +54,0 @@ }; |
{ | ||
"name": "yeoman-environment", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "Handles the lifecyle and bootstrapping of generators in a specific environment", | ||
@@ -5,0 +5,0 @@ "homepage": "http://yeoman.io", |
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
36630
991