-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
refactor(_meta): replace with build time JSON #2840
Merged
Merged
Conversation
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
Codecov Report
@@ Coverage Diff @@
## master #2840 +/- ##
==========================================
- Coverage 99.74% 99.74% -0.01%
==========================================
Files 160 160
Lines 2779 2696 -83
==========================================
- Hits 2772 2689 -83
Misses 7 7
Continue to review full report at Codecov.
|
levithomason
changed the title
[WIP] Remove static _meta and generate data
refactor(_meta): replace _meta with generated json
May 31, 2018
levithomason
changed the title
refactor(_meta): replace _meta with generated json
refactor(_meta): replace with build time JSON
May 31, 2018
Released in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #2848
This PR removes the static
_meta
property from our components. This required widespread changes. During these changes, many other improvements were made.Notable Changes
Remove
_meta
from all components, docs, and testsThis property is only used for documentation and tests, yet it is exposed in production code. Our production bundle will now be smaller due to removing this property from every component and subcomponent.
Generate JSON files for docs and tests
componentMenu.json
A minimal list of component display names and types. Powers the main docs left menu.
docs/app/exampleMenus/Component.examples.json
A separate gitignored json file describing the examples of each component. Used in the docs right menu and dynamically imported. Previously called
menuInfo.json
.docs/app/componentInfo/Component.info.json
A separate gitignored file for every component. This file documents the component and its API in detail as well as information about the file and path itself. This detailed information is used in tests and the doc site. Replaces
docgenInfo.json
andparentComponents.js
,componentInfo.js
, andMETA.js
.Other Changes
docs/app/HOC/pure
in favor ofReact.PureComponent
.docs/app/HOC/withDocInfo
in favor of computing in the single place it is required.docs/app/utils/getNewHash
as it is unused.docs/app/utils/isOldHash
as it is unused.name
,componentName
, anddisplayName
in doc site props and variables.subComponents
=>subcomponents
docBlock
=>docblock
TODO
*.info.json
files on component change...others