-
Notifications
You must be signed in to change notification settings - Fork 188
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
[fix] Move theme registration to src #182
Conversation
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.
This is either semver-minor (adding new things) or semver-major (existing consumers of the scripts dir will break).
@ljharb I believe public interface being exposed hasn't changed, so this should be |
@philipfweiss all accessible files are part of the public interface. |
ab58b62
to
e2a999a
Compare
e2a999a
to
64a665a
Compare
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.
Some comments! :)
.storybook-css/config.js
Outdated
@@ -2,7 +2,7 @@ import { configure } from '@kadira/storybook'; | |||
import ThemedStyleSheet from 'react-with-styles/lib/ThemedStyleSheet'; | |||
import aphroditeInterface from 'react-with-styles-interface-aphrodite'; | |||
import '../css/rheostat.css'; | |||
import registerCSSInterfaceWithDefaultTheme from '../scripts/utils/registerCSSInterfaceWithDefaultTheme'; | |||
import registerCSSInterfaceWithDefaultTheme from '../lib/utils/registerCSSInterfaceWithDefaultTheme'; |
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.
I don't think we want this update. Let's pull from src
here.
.storybook/config.js
Outdated
@@ -1,7 +1,7 @@ | |||
import { configure } from '@kadira/storybook'; | |||
import ThemedStyleSheet from 'react-with-styles/lib/ThemedStyleSheet'; | |||
import aphroditeInterface from 'react-with-styles-interface-aphrodite'; | |||
import registerInterfaceWithDefaultTheme from '../scripts/utils/registerInterfaceWithDefaultTheme'; | |||
import registerInterfaceWithDefaultTheme from '../lib/utils/registerInterfaceWithDefaultTheme'; |
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.
I don't think we want this update. Let's pull from src here. Otherwise we'll have to build all the js every time we run storybook
src/utils/.eslintrc
Outdated
@@ -0,0 +1,7 @@ | |||
{ |
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.
Um, I don't think we want this eslintrc here. the src/utils folder should not be importing dev dependencies.
@@ -1,3 +1,5 @@ | |||
/* This file should be removed in the next major version update of Rheostat */ |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@@ -1,3 +1,5 @@ | |||
/* This file should be removed in the next major version update of Rheostat */ |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Looks great to me! |
Addresses #181. Moves the theme registration helper functions into src, so they will be compiled during the build step. Also updates the callsites of these functions to point into
lib/utils/<x>
, as desired.Keeps a copy of these files in
scripts/utils
as well, for backwards-compatibility. These files should be removed at the next major version update.