Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yeoman-environment

Package Overview
Dependencies
Maintainers
6
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yeoman-environment - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

24

lib/environment.js
'use strict';
var util = require('util');
var fs = require('fs');
var path = require('path');

@@ -11,3 +12,3 @@ var events = require('events');

var memFs = require('mem-fs');
var debug = require('debug')('generators:environment');
var debug = require('debug')('yeoman:environment');
var Store = require('./store');

@@ -153,3 +154,3 @@ var resolver = require('./resolver');

* @param {String} namespace - Namespace under which register the generator (optional)
* @return {this}
* @return {String} namespace - Namespace assigned to the registered generator
*/

@@ -235,3 +236,3 @@

* @param {String} namespace
* @return {Generator} - the generator registered under the namespace
* @return {Generator|null} - the generator registered under the namespace
*/

@@ -247,6 +248,21 @@

this.store.get(this.alias(namespace)) ||
this.get(namespace.split(':').slice(0, -1).join(':'));
this.get(namespace.split(':').slice(0, -1).join(':')) ||
this.getByPath(namespace);
};
/**
* Get a generator by path instead of namespace.
* @param {String} path
* @return {Generator|null} - the generator found at the location
*/
Environment.prototype.getByPath = function (path) {
if (fs.existsSync(path)) {
var namespace = this.namespace(path);
this.register(path, namespace);
return this.get(namespace);
}
};
/**
* Create is the Generator factory. It takes a namespace to lookup and optional

@@ -253,0 +269,0 @@ * hash of options, that lets you define `arguments` and `options` to

2

lib/resolver.js

@@ -6,3 +6,3 @@ 'use strict';

var globby = require('globby');
var debug = require('debug')('generators:environment');
var debug = require('debug')('yeoman:environment');

@@ -9,0 +9,0 @@ var win32 = process.platform === 'win32';

{
"name": "yeoman-environment",
"version": "1.3.0",
"version": "1.4.0",
"description": "Handles the lifecyle and bootstrapping of generators in a specific environment",
"license": "BSD-2-Clause",
"homepage": "http://yeoman.io",
"author": "Yeoman",
"files": [
"lib"
],
"main": "lib/environment.js",

@@ -20,17 +24,10 @@ "keywords": [

],
"homepage": "http://yeoman.io",
"author": "Yeoman",
"license": "BSD-2-Clause",
"repository": "yeoman/environment",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "make tests",
"test": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"doc": "jsdoc -c ./jsdoc.json ./readme.md",
"benchmark": "matcha benchmark/**",
"prepublish": "nsp audit-package"
"prepublish": "gulp prepublish"
},
"files": [
"lib"
],
"dependencies": {

@@ -41,3 +38,3 @@ "chalk": "^1.0.0",

"escape-string-regexp": "^1.0.2",
"globby": "^3.0.1",
"globby": "^4.0.0",
"grouped-queue": "^0.3.0",

@@ -52,21 +49,21 @@ "inquirer": "^0.11.0",

"devDependencies": {
"coveralls": "^2.11.2",
"coveralls": "^2.11.6",
"gulp": "^3.6.0",
"gulp-coveralls": "^0.1.3",
"gulp-istanbul": "^0.10.0",
"gulp-coveralls": "^0.1.0",
"gulp-eslint": "^1.0.0",
"gulp-exclude-gitignore": "^1.0.0",
"gulp-istanbul": "^0.10.3",
"gulp-jscs": "^3.0.0",
"gulp-jshint": "^1.5.3",
"gulp-mocha": "^2.0.0",
"gulp-util": "^3.0.3",
"istanbul": "^0.4.0",
"gulp-nsp": "^2.1.0",
"gulp-plumber": "^1.0.0",
"istanbul": "^0.4.1",
"jsdoc": "^3.3.0-alpha9",
"jshint": "^2.6.0",
"jshint-stylish": "^2.0.1",
"matcha": "^0.6.0",
"mocha": "^2.1.0",
"nsp": "*",
"mocha": "^2.3.4",
"shelljs": "^0.5.0",
"sinon": "^1.9.1",
"yeoman-generator": "^0.20.1"
"yeoman-assert": "^2.1.1",
"yeoman-generator": "^0.22.1"
}
}

@@ -1,2 +0,2 @@

# Yeoman Environment [![Build Status](https://travis-ci.org/yeoman/generator.svg?branch=master)](https://travis-ci.org/yeoman/environment) [![Coverage Status](https://coveralls.io/repos/yeoman/environment/badge.svg?branch=master&service=github)](https://coveralls.io/github/yeoman/environment?branch=master)
# Yeoman Environment [![npm](https://badge.fury.io/js/yeoman-environment.svg)](http://badge.fury.io/js/yeoman-environment) [![Build Status](https://travis-ci.org/yeoman/generator.svg?branch=master)](https://travis-ci.org/yeoman/environment) [![Coverage Status](https://coveralls.io/repos/yeoman/environment/badge.svg?branch=master&service=github)](https://coveralls.io/github/yeoman/environment?branch=master)

@@ -7,3 +7,2 @@ > Handles the lifecycle and bootstrapping of generators in a specific environment

## Install

@@ -18,2 +17,4 @@

Full documentation available at http://yeoman.io/authoring/integrating-yeoman.html
```js

@@ -20,0 +21,0 @@ var yeoman = require('yeoman-environment');

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc