Skip to content

Commit 22e10b4

Browse files
committed
Merge branch 'nickknissen-use-yarn'
2 parents 07bf751 + 81531bf commit 22e10b4

File tree

4 files changed

+23
-9
lines changed

4 files changed

+23
-9
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ Thanks to Baptiste Augrain for making the benchmarks more sophisticated and addi
88

99
## Prerequsites
1010

11-
Have *node.js (>=6.0)* installed . If you want to do yourself a favour use nvm for that. The benchmark has been tested with node 6.0.
11+
Have *node.js (>=6.0)* installed. If you want to do yourself a favour use nvm for that and install yarn. The benchmark has been tested with node 6.0.
1212
You will also need *java* (>=6, e.g. openjdk-8-jre on ubuntu) for the google closure compiler, currently used in kivi.
1313

1414
## Building
1515

1616
* To build the benchmarks for all frameworks:
1717

1818
`npm install`
19+
or
20+
`yarn`
1921

2022
`npm run build`
2123

@@ -26,6 +28,8 @@ The latter calls npm build-prod in each subproject.
2628
`cd aurelia`
2729

2830
`npm install`
31+
or
32+
`yarn`
2933

3034
`npm run build-prod`
3135

ember-v2.6.1/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"author": "",
1818
"license": "MIT",
1919
"devDependencies": {
20+
"bower": "^1.7.9",
2021
"broccoli-asset-rev": "2.4.2",
2122
"ember-ajax": "2.0.1",
2223
"ember-cli": "2.6.2",

install.js

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
var _ = require('lodash');
22
var exec = require('child_process').execSync;
33
var fs = require('fs');
4+
var commandExists = require('command-exists');
45

5-
_.each(fs.readdirSync('.'), function(name) {
6-
if(fs.statSync(name).isDirectory() && name[0] !== '.' && name !== 'css' && name !== 'node_modules') {
7-
exec('npm install', {
8-
cwd: name,
9-
stdio: 'inherit'
10-
});
11-
}
12-
});
6+
var instalCommand = 'npm install';
7+
8+
commandExists('yarn', function(err, commandExists) {
9+
10+
instalCommand = commandExists ? 'yarn' : 'npm install';
11+
12+
_.each(fs.readdirSync('.'), function(name) {
13+
if(fs.statSync(name).isDirectory() && name[0] !== '.' && name !== 'css' && name !== 'node_modules') {
14+
exec(instalCommand, {
15+
cwd: name,
16+
stdio: 'inherit'
17+
});
18+
}
19+
});
20+
});

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"license": "ISC",
2626
"homepage": "https://github.com/krausest/js-framework-benchmark",
2727
"dependencies": {
28+
"command-exists": "^1.0.2",
2829
"fs-extra": "^0.30.0",
2930
"http-server": "^0.9.0",
3031
"lodash": "^4.15.0"

0 commit comments

Comments
 (0)