Reputation: 99
I have a generator working with Yeoman, and one of the steps into the generation process installs fours Node Modules, Its ok, but I would like to define an specific version for those packages.
This is what I have in my generator:
installingDependencies() {
this.yarnInstall(
['webpack','babel-core', 'babel-loader', 'babel-preset-es2015'],
{ 'dev' : true }
);
}
These are the versions needed:
"devDependencies": {
"babel-core": "^6.5.1",
"babel-loader": "^6.2.2",
"babel-preset-es2015": "^6.5.0",
"webpack": "^2.2.1"
}
Any Idea? Thanks.
Upvotes: 1
Views: 54
Reputation: 1673
Found out that the values are passed to the command line, so this will work:
this.yarnInstall([
"browser-sync@^2.18.12"
], { dev: true });
Upvotes: 1