Skip to content
Permalink
Browse files
Merge pull request #4 from raphinesse/silence-output
Silence output
  • Loading branch information
raphinesse committed Sep 25, 2018
2 parents 31965d0 + 927ae6c commit 9f44c725756666e9ea09a0957b06b3c42cff2390
Showing 2 changed files with 11 additions and 15 deletions.
@@ -40,7 +40,7 @@ function createAndBuild(projectname, projectid) {
// create the project
command = util.format('"%s" "%s/%s" "%s" "%s"', createScriptPath, tmpDir, projectname, projectid, projectname);
//shell.echo(command);
return_code = shell.exec(command).code;
return_code = shell.exec(command, { silent: true }).code;
expect(return_code).toBe(0);


@@ -63,29 +63,25 @@ Api.createPlatform = function (destination, config, options, events) {
events.emit('log', '\tPath: ' + destination);
events.emit('log', '\tName: ' + projectName);

shell.mkdir(destination);
shell.mkdir('-p', destination);

// move a copy of our api to the new project
shell.cp('-r',apiSrcPath, destination);

// move our node_modules
var srcModulePath = path.join(__dirname,'../../node_modules');
shell.cp('-r',srcModulePath,destination);

// I promise I will return
return Promise.resolve(new Api(PLATFORM_NAME,destination,events));

};


Api.updatePlatform = function (destination, options, events) {
// console.log("test-platform:Api:updatePlatform");
events.emit('log', "test-platform:Api:updatePlatform");
// todo?: create projectInstance and fulfill promise with it.
return Promise.resolve();
};

Api.prototype.getPlatformInfo = function () {
console.log("test-platform:Api:getPlatformInfo");
events.emit('log', "test-platform:Api:getPlatformInfo");
// return PlatformInfo object

return {
@@ -98,36 +94,36 @@ Api.prototype.getPlatformInfo = function () {
};

Api.prototype.prepare = function (cordovaProject) {
console.log("test-platform:Api:prepare");
events.emit('log', "test-platform:Api:prepare");
return Promise.resolve();
};

Api.prototype.addPlugin = function (plugin, installOptions) {
console.log("test-platform:Api:addPlugin");
events.emit('log', "test-platform:Api:addPlugin");
return Promise.resolve();
};

Api.prototype.removePlugin = function (plugin, uninstallOptions) {
console.log("test-platform:Api:removePlugin");
events.emit('log', "test-platform:Api:removePlugin");
return Promise.resolve();
};

Api.prototype.build = function (buildOptions) {
console.log("test-platform:Api:build");
events.emit('log', "test-platform:Api:build");
return Promise.resolve();
};

Api.prototype.run = function(runOptions) {
console.log("test-platform:Api:run");
events.emit('log', "test-platform:Api:run");
};

Api.prototype.clean = function(cleanOptions) {
console.log("test-platform:Api:clean");
events.emit('log', "test-platform:Api:clean");
return Promise.resolve();
};

Api.prototype.requirements = function() {
console.log("test-platform:Api:requirements");
events.emit('log', "test-platform:Api:requirements");
return true;
};

0 comments on commit 9f44c72

Please sign in to comment.