stylesuxx / generator-react-webpack-redux

React Webpack Generator including Redux support
Other
552 stars 85 forks source link

[Question] compile some specifics assets but not all of them #42

Closed diegoalmesp closed 8 years ago

diegoalmesp commented 8 years ago

Hello guys! first of all, this is a question, not an issue.

I've already worked with React Js but never using a generator (well, I used Meteor) like this one. And I need a specific feature but I'm not sure how to implement it using this package. So:

I'm going to build several "components" for a web page that's already online, meaning, I can't change/migrate the whole page to be a SPA, only create new components.

The idea is to create different components with this package and release them (with all its specific assets) in a way that I can attach each one of them to that existing website, separately.

My questions are:

  1. Can I use this generator to generate a distribution package with only the contents of the specific components an not the whole html template? I know I can only place in the index.html file the code that I need, but I also need the assets of the webpage to be present for development, but they're already online so: I need 6 css files to be present during development, but when I build it, I only need the custom.css file I created. Do you have any suggestion on how to tackle this?
  2. Also, for each new component, I'm planing to "replace" the /src folder to create a new set of files (I don't think this might be a good practise but I'm short on better ideas)

I'm kind of lost with this, and I downloaded this package which has exactly what I need except for that.

Thanks in advance!

diegoalmesp commented 8 years ago

doesn't matter, the package is great! I'm just gonna create new packages for each new component. Very simple