From cfd19bb6cd44f136c5545fbc19526981531ef69b Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Mon, 5 Oct 2015 11:16:52 -0700 Subject: [PATCH] [cli] Add a big warning to stop people from modifying the global cli --- react-native-cli/index.js | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/react-native-cli/index.js b/react-native-cli/index.js index 66b215830..d9d217acc 100755 --- a/react-native-cli/index.js +++ b/react-native-cli/index.js @@ -1,9 +1,38 @@ #!/usr/bin/env node /** - * Copyright 2004-present Facebook. All Rights Reserved. + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. */ +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// /!\ DO NOT MODIFY THIS FILE /!\ +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// +// react-native-cli is installed globally on people's computers. This means +// that it is extremely difficult to have them upgrade the version and +// because there's only one global version installed, it is very prone to +// breaking changes. +// +// The only job of react-native-cli is to init the repository and then +// forward all the commands to the local version of react-native. +// +// If you need to add a new command, please add it to local-cli/. +// +// The only reason to modify this file is to add more warnings and +// troubleshooting information for the `react-native init` command. +// +// Do not make breaking changes! We absolutely don't want to have to +// tell people to update their global version of react-native-cli. +// +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// /!\ DO NOT MODIFY THIS FILE /!\ +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 'use strict'; var fs = require('fs');