forked from react-native-community/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add verbose logging flag, debug logging for (un)link commands (react-…
…native-community#239) Summary: --------- This PR addresses react-native-community#96 and: * Adds the `--verbose` flag to enable `DEBUG` logs * Adds `setVerbose(boolean)` to `tools/logger.js` so that it can enable/disable `DEBUG` logs * Adds debug logs for the (un)link commands * Adds Flow typings to `commands/link/android/unlinkAssets.js` I haven't added `DEBUG` logs to other parts of the CLI because: * I'm not that familiar with the other CLI commands * I'd like some feedback on what I've done so far before going on Also, would it be better to add debug logs in chunks, say one PR per command? I suspect this PR would become too big otherwise. Test Plan: ---------- These additions do not change any implementations but I ran the tests anyway, all green. I also ran it against two existing projects and a freshly created one: no changes in behavior. Screenshots: ---------- How the new flag is presented when using `--help`: <img width="500" alt="Screenshot 2019-03-15 at 22 07 26" src="https://user-images.githubusercontent.com/1713151/54462920-a2d11a00-4771-11e9-812a-00972da67f1a.png"> How `link packageName --verbose` looks like: <img width="816" alt="Screenshot 2019-03-15 at 22 09 08" src="https://user-images.githubusercontent.com/1713151/54463021-f2afe100-4771-11e9-9213-d1f783c1f0d5.png"> How `link packageName --verbose` looks like (module with assets): <img width="789" alt="Screenshot 2019-03-15 at 22 33 28" src="https://user-images.githubusercontent.com/1713151/54463179-7b2e8180-4772-11e9-9547-1e8907d6151d.png"> How `unlink packageName --verbose` looks like: <img width="803" alt="Screenshot 2019-03-15 at 22 09 34" src="https://user-images.githubusercontent.com/1713151/54463217-a022f480-4772-11e9-8130-9824bb0bb0f9.png"> <img width="805" alt="Screenshot 2019-03-15 at 22 13 58" src="https://user-images.githubusercontent.com/1713151/54463227-a618d580-4772-11e9-9420-315e35d3d55c.png">
- Loading branch information
1 parent
e39121e
commit f8be283
Showing
19 changed files
with
103 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.