Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-17990] Print the CLI build command in the console view #6734

Merged
merged 1 commit into from
Apr 8, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
46 changes: 25 additions & 21 deletions cli/commands/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,14 @@ exports.validate = function (logger, config, cli) {
if (cli.argv.type === 'module') {

return function (finished) {
var result = ti.validatePlatformOptions(logger, config, cli, 'buildModule');
if (result && typeof result == 'function') {
result(finished);
} else {
finished(result);
}
logger.log.init(function () {
var result = ti.validatePlatformOptions(logger, config, cli, 'buildModule');
if (result && typeof result == 'function') {
result(finished);
} else {
finished(result);
}
});
};

} else {
Expand All @@ -240,24 +242,26 @@ exports.validate = function (logger, config, cli) {
// since we need validate() to be async, we return a function in which the cli
// will immediately call
return function (finished) {
function next(result) {
if (result !== false) {
// no error, load the tiapp.xml plugins
ti.loadPlugins(logger, config, cli, cli.argv['project-dir'], function () {
logger.log.init(function () {
function next(result) {
if (result !== false) {
// no error, load the tiapp.xml plugins
ti.loadPlugins(logger, config, cli, cli.argv['project-dir'], function () {
finished(result);
});
} else {
finished(result);
});
} else {
finished(result);
}
}
}

// loads the platform specific bulid command and runs its validate() function
var result = ti.validatePlatformOptions(logger, config, cli, 'build');
if (result && typeof result == 'function') {
result(next);
} else {
next(result);
}
// loads the platform specific bulid command and runs its validate() function
var result = ti.validatePlatformOptions(logger, config, cli, 'build');
if (result && typeof result == 'function') {
result(next);
} else {
next(result);
}
});
};
}
};
Expand Down