You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.3 KiB
40 lines
1.3 KiB
3 years ago
|
# Yeoman Environment
|
||
|
|
||
|
[](http://badge.fury.io/js/yeoman-environment) [](https://travis-ci.org/yeoman/environment) [](https://coveralls.io/github/yeoman/environment?branch=master) [](https://gitter.im/yeoman/yeoman)
|
||
|
|
||
|
> Handles the lifecycle and bootstrapping of generators in a specific environment
|
||
|
|
||
|
It provides a high-level API to discover, create and run generators, as well as further tuning of where and how a generator is resolved.
|
||
|
|
||
|
|
||
|
## Install
|
||
|
|
||
|
```
|
||
|
$ npm install yeoman-environment
|
||
|
```
|
||
|
|
||
|
|
||
|
## Usage
|
||
|
|
||
|
Full documentation available [here](http://yeoman.io/authoring/integrating-yeoman.html).
|
||
|
|
||
|
```js
|
||
|
const yeoman = require('yeoman-environment');
|
||
|
const env = yeoman.createEnv();
|
||
|
|
||
|
// The #lookup() method will search the user computer for installed generators
|
||
|
// The search if done from the current working directory
|
||
|
env.lookup(() => {
|
||
|
env.run('angular', {'skip-install': true}, err => {
|
||
|
console.log('done');
|
||
|
});
|
||
|
});
|
||
|
```
|
||
|
|
||
|
For advance usage, see [our API documentation](http://yeoman.github.io/environment).
|
||
|
|
||
|
|
||
|
## License
|
||
|
|
||
|
BSD-2-Clause © Yeoman
|