Closed FranciscoKloganB closed 4 months ago
@FranciscoKloganB
Thanks for bringing this up. I'm aware that the current setup doesn't work well with nx
monorepos. However, this is a low priority for me compared to other open issues and features I want to build.
As a solid workaround, I recommend fetching the components, placing them somewhere, and then running a post script to move the files to the final destination.
Here's an example:
"scripts": {
"park-ui": "lefthook install",
"postpark-ui": "rsync -av --delete ./components/react/src/demos ./website/src/"
}
I know this isn't the solution you're aiming for, but it should work for now. Thanks for your understanding.
Edit:
A list of all components can be fetched from https://park-ui.com/registry/latest/react/components A single component can be fetched from https://park-ui.com/registry/latest/react/components/button.json
In case you want to quickly build sth for your self.
I understand. I was looking at the source code, unfortunatly, I never used effect. I wouldn't know where to start. I guess I will do the old-fashioned copy/pasta for the time being.
@FranciscoKloganB
I've updated the CLI so that a tsconfig.json is no longer required to install components. This benefits users with setups like nx workspaces that lack a tsconfig.json file.
User Story
As a
@park-ui/cli
user I want to be able to declare the import alias for PandaCSS styled-system location independantly ofcomponent
andlib
directories Additionally I want to be able to specify the component and library directories with relative or absolute importsWhat is the current behaviour
Currently the CLI expects the
components
andlib
directories to depend on the alias as demonstrated on the code snippets and the image below.This is what I must do (does not work for my usecase)
What I would like to do
Context
I am working in an Nx monorepo with multiple applications and packages.
My package
react-web-ui
contains components forpark-ui
, but other applications and libs may also usePandaCSS
, each may have their own auto-generatedstyled-system
folder.Consequently, I have this
tsConfig.paths
defined. I'd prefer if I did not have to create additional@styled-system/react-web-ui/components/*
nor@styled-system/react-web-ui/lib/*