-
Notifications
You must be signed in to change notification settings - Fork 73
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
Enable themes #852
Merged
Merged
Enable themes #852
Changes from 49 commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
b4a49a7
feat: create type for storing theme colors
AllanOricil 095c6a7
feat: include color and @types/color, and simiplify theme schema
AllanOricil ad5f324
feat: set theme's default colors to white
AllanOricil 26a418a
feat: set FORCE_COLOR to 0||3 to follow the NO_COLOR manifest
AllanOricil 4c587b9
feat: create DEFAULT_THEME to store default colors
AllanOricil f7c5912
revert: remove NO_COLOR manifest
AllanOricil 8dbaebd
feat: add new theme variables to style $, flag, and flag options
AllanOricil cbdf4ca
feat: add color to section headers
AllanOricil 0e823f2
feat: configure default colors
AllanOricil 0f91695
feat: add colors for bin, command summary and version
AllanOricil 94ea7af
feat: topics, commands, bin, version, sections, dollar sign are color…
AllanOricil 3208ea3
feat: configure default colors
AllanOricil 20a150c
feat: add feature flag to enabled/disable theme
AllanOricil 07d7501
feat: add colorize function to simplify the way colors are added to s…
AllanOricil 1e91233
feat: change all chalk.hex calls to colorize
AllanOricil 27987e4
feat: configure OCLIF_ENABLE_THEME to have precence over PJSON prop
AllanOricil 180b179
feat: all theme colors are optional
AllanOricil 8d561f7
fix: error TS2322: Type 'string' is not assignable to type 'boolean'
AllanOricil 22d3e6d
fix: error TS2345: arg of type 'Color<ColorParam>|undefined' not assi…
AllanOricil 39bf5b2
fix: runtime error TypeError: color.hex is not a function
AllanOricil 7be8136
fix: this.pjson.oclif.enableTheme was not being evaluated when OCLIF…
AllanOricil 653c1c2
chore(deps): update yarn.lock
AllanOricil 6673ec5
refactor: simplified code removing OCLIF_ENABLE_THEME constant
AllanOricil 80421ee
fix: command summary was not changing its color when running the root…
AllanOricil fd3d17e
feat: theme is now read from ~/config/<CLI>/theme.json if one exists
AllanOricil f6c7744
fix: add colors to other ARGUMENTS, EXAMPLES, DESCRIPTION, FLAGS DESC…
AllanOricil 7a35ca7
feat: add color token for aliases
AllanOricil 92ff5ff
fix(test): change template strings to avoid expected results printing…
AllanOricil 7691535
fix(test): add a missing parenthesis back so that all options are wra…
AllanOricil c252a13
fix(test): remove single quotes wraping default flag values
AllanOricil 9f8591b
feat: add test:debug script to ease debuging
AllanOricil 02fc7aa
refactor: add a constant with all possible THEME_KEYS
AllanOricil 6b36522
test: add tests to prove parsing untyped json object with color strin…
AllanOricil 66c7cde
chore(package): add new scripts to ease development while writing tests
AllanOricil 1a6b462
revert: remove theme from PJSON because a theme will be loaded from c…
AllanOricil 7124de1
feat: add scopedEnvVarBoolean because scopedEnvVarTrue does not consi…
AllanOricil dce013d
feat(test): add tests to prove the behavior that enables theme
AllanOricil 2834517
refactor: replace all scopedEnvVarTrue by scopedEnvVarBoolean, which …
AllanOricil c8d671d
test: add tests to prove the enableTheme behavior
AllanOricil 24ca8f5
refactor: simplify parseTheme method
AllanOricil 84db405
chore(package): remove localhost:4873 from lock file
AllanOricil 4927e47
revert: rever scopedEnvVarBoolean back to scopedEnvVarTrue
AllanOricil c7488bb
test: add tests to prove when this.theme is set
AllanOricil 37588ce
feat: ensure colorize returns string only
AllanOricil 714d989
test: add tests to prove colorize works as expected
AllanOricil fa1f414
revert: rollback scopedEnvVarTrue as it was before
AllanOricil 2c9da22
refactor: move parseTheme to src/util/util.js
AllanOricil 49a1446
refactor: make Theme type dinamically based on the values of THEME_KE…
AllanOricil bc369b3
fix: err TS1259: Module /@types/color/index can only be default-impor…
AllanOricil f9dbcbb
revert: remove enableTheme from pjson because we don't want to cli de…
AllanOricil caaa353
revert: remove undefined as a return type for scopedEnvVarTrue
AllanOricil 00a6ccd
refactor: remove config.enableTheme
AllanOricil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That way you don't have to use
as
when passing it toparseTheme
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdonnalley
fixed at 00a6ccd
Could you tell me if you agree with what I did. I removed enableTheme from config.