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

refactor: hide implementations of build & run #1188

Merged
merged 1 commit into from
Nov 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bin/templates/scripts/cordova/lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ function getDefaultSimulatorTarget () {
});
}

/** @returns {Promise<void>} */
module.exports.run = buildOpts => {
let emulatorTarget = '';
const projectPath = path.join(__dirname, '..', '..');
Expand Down Expand Up @@ -263,7 +264,8 @@ module.exports.run = buildOpts => {
return fs.writeFile(exportOptionsPath, exportOptionsPlist, 'utf-8')
.then(checkSystemRuby)
.then(packageArchive);
});
})
.then(() => {}); // resolve to undefined
};

/**
Expand Down
4 changes: 3 additions & 1 deletion bin/templates/scripts/cordova/lib/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const fs = require('fs-extra');
const cordovaPath = path.join(__dirname, '..');
const projectPath = path.join(__dirname, '..', '..');

/** @returns {Promise<void>} */
module.exports.run = runOptions => {
// Validate args
if (runOptions.device && runOptions.emulator) {
Expand Down Expand Up @@ -108,7 +109,8 @@ module.exports.run = runOptions => {
} else {
return module.exports.deployToSim(appPath, runOptions.target);
}
});
})
.then(() => {}); // resolve to undefined
};

module.exports.filterSupportedArgs = filterSupportedArgs;
Expand Down