sui icon indicating copy to clipboard operation
sui copied to clipboard

feat(packages/sui-studio): Add new param to use explicit import

Open stivaliserna opened this issue 3 years ago • 3 comments

Description

This PR adds a new option --explicit to generate a component in a file with its same name and an index re-export, this makes searching easier while keeping cleaner imports.

Component
  src
    |--Component.js
    |--index.js

Beta: @s-ui/[email protected]

Feedback is much appreciated 🙂

stivaliserna avatar Sep 01 '22 14:09 stivaliserna

If this is the new way of generating component, maybe we should create a script to modify also the already created components, so we just have one standard way of creating components. What do you think?

arnau-rius avatar Sep 02 '22 12:09 arnau-rius

If this is the new way of generating component, maybe we should create a script to modify also the already created components, so we just have one standard way of creating components. What do you think?

Yeah, makes sense! And we'll need to migrate the rest of components to actually solve our pain. Will work on it 👌

Thanks @arnau-rius!

stivaliserna avatar Sep 02 '22 12:09 stivaliserna

If this is the new way of generating component, maybe we should create a script to modify also the already created components, so we just have one standard way of creating components. What do you think?

Yeah, makes sense! And we'll need to migrate the rest of components to actually solve our pain. Will work on it 👌

Thanks @arnau-rius!

In case it gives you some guidance, here you can find two migrations that previously had been applied to the sui-studio, for cases similar to this one.

https://github.com/SUI-Components/sui/tree/master/packages/sui-studio/bin/migrations

  • demo-folders
  • test-folders

Maybe would be interesting to check that all marketplaces are OK with this new structure before coding/planning a migration.

👍🏽

arnau-rius avatar Sep 02 '22 14:09 arnau-rius