Skip to content

Commit

Permalink
Merge pull request #156 from bryan-m-hughes/timob-13491-1_0_X
Browse files Browse the repository at this point in the history
[TIMOB-13491] Manual backport to 1_0_X
  • Loading branch information
nebrius committed Apr 9, 2013
2 parents 88bb2f9 + f36c580 commit f23e414
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
15 changes: 11 additions & 4 deletions bin/codeprocessor
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ var path = require('path'),
async = require('async'),
xml2js = require('xml2js'),

appc = require('node-appc'),

CodeProcessor = require(path.resolve(path.join(__dirname, '..'))),
Runtime = require(path.resolve(path.join(__dirname, '..', 'lib', 'Runtime'))),

Expand Down Expand Up @@ -111,7 +109,6 @@ function queryOptions() {

function subprocess() {
var config = process.argv[2],
studioInterface,
filename,
logger;

Expand Down Expand Up @@ -172,8 +169,8 @@ function subprocess() {
});
}

/* The old Messaging interface, graveyarded for now in hopes that it can be resurrected
// Create the interface
studioInterface = appc.messaging.create('stdio');
studioInterface.open();
function callback(error) {
Expand Down Expand Up @@ -231,6 +228,16 @@ function subprocess() {
process.exit(0);
});
});
*/

// Run the code processor
CodeProcessor.run(path.resolve(config.entryPoint), config.options, config.plugins, logger, function () {
var results = JSON.stringify({
messageType: 'results',
data: CodeProcessor.getResults()
});
console.log('REQ,01000001,' + ('00000000' + results.length.toString(16)).slice(-8) + ',' + results);
});
}

function analyze() {
Expand Down
4 changes: 1 addition & 3 deletions lib/CodeProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,7 @@ function run(entryPoint, options, plugins, logger, callback) {

Runtime.log('info', 'Generating results');
Runtime.fireEvent('projectProcessingEnd', 'Project processing complete');
generateResultsPages(Runtime.options.suppressResults, Runtime.options.resultsPath, Runtime.options.resultsTheme, function () {
callback && callback();
});
generateResultsPages(Runtime.options.suppressResults, Runtime.options.resultsPath, Runtime.options.resultsTheme, callback);

return results;
}
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"winston": "0.6.x",
"async": "0.1.x",
"xml2js": "0.2.x",
"node-appc": "0.1.29",
"mu2": "0.5.x",
"colors": "0.6.x"
},
Expand Down

0 comments on commit f23e414

Please sign in to comment.