- Deprecated:
-
- since version 5.0.0. Not included by default.
Example
const Generator = require('yeoman-generator');
_.extend(Generator.prototype, require('yeoman-generator/lib/actions/install'));
Methods
-
static bowerInstall (cmpnt opt , options opt , spawnOptions opt )
-
Parameters:
Name Type Attributes Description cmpnt
String | Array <optional>
Components to install
options
Object <optional>
Options to pass to
dargs
as argumentsspawnOptions
Object <optional>
Options to pass
child_process.spawn
.- Deprecated:
-
- Receives a list of `components` and an `options` object to install through bower. The installation will automatically run during the run loop `install` phase.
-
static installDependencies (options opt )
-
Parameters:
Name Type Attributes Description options
Object <optional>
options
Properties
Name Type Attributes Default Description npm
Boolean | Object <optional>
true whether to run
npm install
or can be options to pass todargs
as argumentsbower
Boolean | Object <optional>
false whether to run
bower install
or can be options to pass todargs
as argumentsyarn
Boolean | Object <optional>
false whether to run
yarn install
or can be options to pass todargs
as argumentsskipMessage
Boolean <optional>
false whether to log the used commands
- Deprecated:
-
- Runs `npm` and `bower`, in sequence, in the generated directory and prints a message to let the user know.
Examples
this.installDependencies({ bower: true, npm: true });
this.installDependencies({ yarn: {force: true}, npm: false });
-
static npmInstall (pkgs opt , options opt , spawnOptions opt )
-
Parameters:
Name Type Attributes Description pkgs
String | Array <optional>
Packages to install
options
Object <optional>
Options to pass to
dargs
as argumentsspawnOptions
Object <optional>
Options to pass
child_process.spawn
.- Deprecated:
-
- Receives a list of `packages` and an `options` object to install through npm. The installation will automatically run during the run loop `install` phase.
-
static scheduleInstallTask (installer, paths opt , options opt , spawnOptions opt )
-
Parameters:
Name Type Attributes Description installer
String Which package manager to use
paths
String | Array <optional>
Packages to install. Use an empty string for
npm install
options
Object <optional>
Options to pass to
dargs
as argumentsspawnOptions
Object <optional>
Options to pass
child_process.spawn
. ref https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options- Deprecated:
-
- Combine package manager cmd line arguments and run the `install` command. During the `install` step, every command will be scheduled to run once, on the run loop.
-
static yarnInstall (pkgs opt , options opt , spawnOptions opt )
-
Parameters:
Name Type Attributes Description pkgs
String | Array <optional>
Packages to install
options
Object <optional>
Options to pass to
dargs
as argumentsspawnOptions
Object <optional>
Options to pass
child_process.spawn
.- Deprecated:
-
- Receives a list of `packages` and an `options` object to install through yarn. The installation will automatically run during the run loop `install` phase.