mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 20:01:01 +08:00
Prettier files with shebang
Reviewed By: yungsters Differential Revision: D7974564 fbshipit-source-id: 00db563ce24868c0fde117e981936b83cec30e48
This commit is contained in:
committed by
Facebook Github Bot
parent
36fcbaa56d
commit
0e5c2633ee
43
react-native-git-upgrade/index.js
vendored
43
react-native-git-upgrade/index.js
vendored
@@ -5,30 +5,34 @@
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
var argv = require('minimist')(process.argv.slice(2));
|
||||
var cli = require('./cli');
|
||||
|
||||
if (argv._.length === 0 && (argv.h || argv.help)) {
|
||||
console.log([
|
||||
'',
|
||||
' Usage: react-native-git-upgrade [version] [options]',
|
||||
'',
|
||||
'',
|
||||
' Commands:',
|
||||
'',
|
||||
' [Version] upgrades React Native and app templates to the desired version',
|
||||
' (latest, if not specified)',
|
||||
'',
|
||||
' Options:',
|
||||
'',
|
||||
' -h, --help output usage information',
|
||||
' -v, --version output the version number',
|
||||
' --verbose output debugging info',
|
||||
' --npm force using the npm client even if your project uses yarn',
|
||||
'',
|
||||
].join('\n'));
|
||||
console.log(
|
||||
[
|
||||
'',
|
||||
' Usage: react-native-git-upgrade [version] [options]',
|
||||
'',
|
||||
'',
|
||||
' Commands:',
|
||||
'',
|
||||
' [Version] upgrades React Native and app templates to the desired version',
|
||||
' (latest, if not specified)',
|
||||
'',
|
||||
' Options:',
|
||||
'',
|
||||
' -h, --help output usage information',
|
||||
' -v, --version output the version number',
|
||||
' --verbose output debugging info',
|
||||
' --npm force using the npm client even if your project uses yarn',
|
||||
'',
|
||||
].join('\n'),
|
||||
);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
@@ -37,5 +41,4 @@ if (argv._.length === 0 && (argv.v || argv.version)) {
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
cli.run(argv._[0], argv)
|
||||
.catch(console.error);
|
||||
cli.run(argv._[0], argv).catch(console.error);
|
||||
|
||||
Reference in New Issue
Block a user