Skip to content
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

kyt .babelrc preset POC #250

Closed
delambo opened this issue Oct 16, 2016 · 3 comments
Closed

kyt .babelrc preset POC #250

delambo opened this issue Oct 16, 2016 · 3 comments
Assignees

Comments

@delambo
Copy link
Member

delambo commented Oct 16, 2016

Internally, there's been some discussion about creating a kyt .bablerc preset. As a standalone package, the preset could be configured in a user's .babelrc file which will give them a convenient way to extend kyt's defaults or start over from scratch. Another idea, if it would work, is to break out the React related stuff into a separate preset so that a user could easily opt in or out of the React defaults.

The advantages to this approach are 1) it supports a standard .babelrc file which is easier for users to customize and 2) by giving users presets, kyt can encapsulate and manage most of the configuration. One problem with this approach is the use case where a user would need to override/remove a plugin or preset in the kyt presets. In that case, the user would most likely have to go without the kyt preset and roll their own configuration.

I'd love to see a POC that supports a user .babelrc with a kyt-core-preset and kyt-react-preset. Each preset could be a separate package but included in the kyt repository.

@jaredmcdonald
Copy link
Contributor

gonna take a crack at this 🙏

@jaredmcdonald
Copy link
Contributor

jaredmcdonald commented Oct 24, 2016

i've got a POC going here--feel free to poke around, though realize it's very preliminary. kyt test especially has a lot that needs to be addressed.

the most important questions seem to be (in descending order of difficulty):

  • how do we get the kyt-managed jest to read in the user's .babelrc and its presets/plugins? (a mod of @tizmagik's function previously in config/babel gets us some of the way there, but there are some open issues) (update: i think i have a better solution now using resolve.sync)
  • does the default install create a .babelrc, or is that something solely for starter kyts? if the former, which preset does it use?
  • how do we get the right process for updating/versioning/publishing these subpackages?

(this branch also starts to outline a direction we could go for #240, using a pretty common pattern--creating a packages directory in the root of the repo, with a bunch of subdirectories for each individually published item)

@delambo
Copy link
Member Author

delambo commented Nov 12, 2016

Closing this - we'll track from #322

@delambo delambo closed this as completed Nov 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants