Open kof opened 5 years ago
Should this package be part of the monorepo? I tend to "no" for 2 reasons:
Yeah, I would agree to not have karma and jest in this monorepo.
Also if there is no easy way to setup karma with rollup, we could keep the current webpack config with karma in that separate repo, since it won't be often updated and neither its lots of code.
Any idea for naming this package?
cssinjs-utils is free
mb cssom-utils is even better
yeah cssom-utils is better
@kof could you get started on this? That way we wouldn't need a separate test script for the babel plugin
I want to finish babel and webpack plugins first. To kick start this we could discuss all functions that we would need to extract from JSS.
I think the functions are mostly/all in https://github.com/cssinjs/jss/blob/master/packages/jss/src/renderers/DomRenderer.js
Yes, but we will have to remove any JSS specific logic/knowledge from them to make them universal.
Let's make a plan for this to move forward on switching the test setup to jest.
I would say that someone needs to identify generic utilities (dom/cssom) needed in DOMRenderer and describe the interfaces of them. Then once its discussed move forward with implementation and releasing a package.
As a first step of moving to jest, we need to separate the code that needs karma and cross-browser testing, since jest doesn't support that.
We can create a small functional utility belt for CSSinJS libraries that encapsulates all the CSSOM/DOM logic and we can use the current karma setup for this library.
Needed also for https://github.com/cssinjs/jss/issues/745