Skip to content

Commit bce3063

Browse files
committed
improve build
1 parent 9fccc6c commit bce3063

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

bobril-v5.0.4/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"debug": "0.7.4",
4242
"colors": "1.1.2",
4343
"esprima": "2.7.3",
44-
"fs-extra": "1.0.0"
44+
"fs-extra": "1.0.0",
45+
"bobril": "5.0.4"
4546
}
4647
}

build.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ var _ = require('lodash');
22
var exec = require('child_process').execSync;
33
var fs = require('fs');
44

5+
var excludedDirectories = ['css', 'dist','node_modules','webdriver-java'];
6+
57
_.each(fs.readdirSync('.'), function(name) {
6-
if(fs.statSync(name).isDirectory() && name[0] !== '.' && name !== 'css' && name !== 'dist' && name !== 'node_modules' && name !== 'webdriver-java') {
8+
if(fs.statSync(name).isDirectory() && name[0] !== '.' && excludedDirectories.indexOf(name)==-1 && !skip) {
9+
console.log("Executing npm run build-prod in "+name);
710
exec('npm run build-prod', {
811
cwd: name,
912
stdio: 'inherit'

ember-v2.10.0-beta.3/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"author": "",
2323
"license": "MIT",
2424
"devDependencies": {
25+
"bower": "^1.7.9",
2526
"broccoli-asset-rev": "^2.5.0",
2627
"ember-cli": "2.10.0",
2728
"ember-cli-app-version": "^2.0.1",

install.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@ var exec = require('child_process').execSync;
33
var fs = require('fs');
44
var commandExists = require('command-exists');
55

6-
var instalCommand = 'npm install';
6+
var installCommand = 'npm install';
7+
8+
var excludedDirectories = ['css', 'dist','node_modules','webdriver-java'];
79

810
commandExists('yarn', function(err, commandExists) {
911

10-
instalCommand = commandExists ? 'yarn' : 'npm install';
12+
installCommand = commandExists ? 'yarn' : 'npm install';
1113

1214
_.each(fs.readdirSync('.'), function(name) {
13-
if(fs.statSync(name).isDirectory() && name[0] !== '.' && ['css', 'dist','node_modules'].indexOf(name)==-1) {
14-
exec(instalCommand, {
15+
if(fs.statSync(name).isDirectory() && name[0] !== '.' && excludedDirectories.indexOf(name)==-1) {
16+
console.log("Executing "+installCommand+" in "+name);
17+
exec(installCommand, {
1518
cwd: name,
1619
stdio: 'inherit'
1720
});

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
"scripts": {
66
"postinstall": "node install.js",
77
"build": "node build.js",
8+
"build-prod": "node build.js",
9+
"compile": "node build.js",
810
"start": "http-server -c-1 .",
911
"selenium": "cd webdriver-ts && npm run selenium && npm run results"
1012
},

0 commit comments

Comments
 (0)