-
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 utils #388
Refactor utils #388
Conversation
Current coverage is 93.75% (diff: 95.83%)@@ master #388 diff @@
==========================================
Files 73 73
Lines 946 944 -2
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 887 885 -2
Misses 59 59
Partials 0 0
|
5874922
to
ea9cea7
Compare
@@ -18,7 +18,7 @@ CONTRIBUTING | |||
- [API](#api) | |||
- [SUI HTML Classes](#sui-html-classes) | |||
- [API Patterns](#api-patterns) | |||
- [Prop Utils](#prop-utils) | |||
- [Utilities](#utilities) |
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.
Updated scripts to update TOC on every build.
ea9cea7
to
da2d661
Compare
<a | ||
href='https://github.com/TechnologyAdvice/stardust/blob/master/CONTRIBUTING.md' | ||
> contribute</a>! | ||
</Message.Content> |
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.
Example of housekeeping, the previous usage of Message here threw warnings as we do not support it any longer.
da2d661
to
a730f7d
Compare
@@ -10,4 +10,4 @@ requireDir('./gulp/tasks') | |||
// do not use tasks/default | |||
// the default task must be loaded after all other tasks | |||
// requireDir above loads all our tasks in alphabetical order | |||
gulp.task('default', gulp.series('generate-docs-json', 'serve', 'watch')) | |||
gulp.task('default', gulp.series('docs', 'serve', 'watch')) |
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.
Housekeeping: build docs completely on npm start
. This cleans/rebuild the doc dist including images.
This PR was begun to fix circular reference issues utils.
propUtils
imported Icon/Image for the prop renderers, however, Icon/Image also imported somepropUtils
. This PR resolves circular references and splits utils into 2 categories and refactors all components.src/lib
Project specific modules that have dependencies on vendors and utils. This is our standard library.
src/factories
These were previously
propRenderers
. Since they didn't actually render anything, but return JSX elements, they are actually factories. They vary fromReact.createFactory
in that they accept a wider variety of input to create an element.We now have a generic
createFactory
function. It returns a factory function capable of creating elements from any value except undefined, including a ReactElement. It accepts extra props and merges theclassName
prop by default. This makes them ideal our prop handling case.createIcon()
,createImage()
)Index Files
Index files were also added to all
src/*
directories. This greatly simplifies imports throughout the project.During this entire process some additional housekeeping was done.