neutrinojs / neutrino

Create and build modern JavaScript projects with zero initial configuration.
https://neutrinojs.org
Mozilla Public License 2.0
3.95k stars 213 forks source link

Multiple React Components Folder #1596

Closed hjwalt closed 3 years ago

hjwalt commented 4 years ago

Enhancement

Currently neutrino.options.components or components in react-components preset only allow a string to be supplied and published as component library. I think allowing an array of string would be useful for that configuration.

My use case is that I need to publish from three different reusable folders with three logical groupings, which are:

  1. components
  2. containers
  3. pages

cons: at the moment all the components would still be published into the same folder, which could be confusing unless the component configuration takes a folder map. i.e. :

{
    components: '', // Mapping to build/, there could be other ways to do this better
    containers: 'containers', // Mapping to build/containers
    pages: 'pages' // Mapping to build/pages
}

p.s. I am a developer too so if neutrino is open, I could develop an initial change implementation to react-components and create a pull.

edmorley commented 4 years ago

Hi! Thank you for filing this issue. This does sound like it would be useful. I don't have much spare time for Neutrino development these days, but if you wanted to open a PR I'd be happy to take a look? :-)

hjwalt commented 4 years ago

@edmorley thank you for your response, I have created the pull request for this change.