Permalink
Browse files

javac looping over files in src dir

  • Loading branch information...
1 parent 0c48845 commit a52df5bbff67d768da54d0df9481e7976b6c06f6 @brolund committed Mar 18, 2012
Showing with 6 additions and 6 deletions.
  1. 0 clear-and-run.sh
  2. +6 −6 src/build.js
View
0 clear-and-run.sh 100644 → 100755
No changes.
View
@@ -8,8 +8,11 @@ var outErrProcess = function(proc, out, err) {
var javac = function(src, bin, callback) {
console.log("Doing javac");
fs.mkdirSync(bin);
- var javac = spawn('javac', ['-d', bin, src]);
- console.log(javac);
+ var args = ['-d', bin ];
+ var files = fs.readdirSync(src);
+ for(var i=0;i<files.length;i++) {args.push(src + files[i]);}
+ var javac = spawn('javac', args);
+ console.log(args);
javac.stdout.on('data', function (data) {
console.log(data);
@@ -30,7 +33,7 @@ var std = function(dir) {
console.log("Creating std fn");
return function(callback) {
return {
- src: dir + "/src/main/java/Hello.java",
+ src: dir + "/src/main/java/",
bin: dir + "/bin"
}
};
@@ -46,8 +49,6 @@ var classes = function(proj) {
};
}
-
-
var build = function(solution) {
var res = {};
console.log("Executing...");
@@ -56,7 +57,6 @@ var build = function(solution) {
}
//////////////////////////////////
-
var config = {
'classes': classes(std('javaroot'))
}

0 comments on commit a52df5b

Please sign in to comment.