react-native-windows
Version:
React Native for Windows
31 lines (24 loc) • 566 B
JavaScript
/**
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
* @format
*/
function just(cmd) {
const path = require('path');
let startIndex = process.argv.findIndex(arg => arg.startsWith('-'));
if (startIndex < 0) {
startIndex = 2;
}
process.argv = [
...process.argv.slice(0, startIndex),
...(cmd ? [cmd] : []),
'--config',
path.resolve(__dirname, 'just-task.js'),
...process.argv.slice(startIndex),
];
require('just-task/lib/cli.js');
}
exports.just = just;
if (require.main === module) {
just();
}