react-everywhere / re-start

react-native template to target multiple platforms :globe_with_meridians: :iphone: :computer: with single codebase.
https://medium.com/@amoghbanta/write-once-use-everywhere-with-react-native-d6e575efe58e#.nfl50gwfg
MIT License
1.3k stars 85 forks source link

Set templates to use `re-base` as dependency #52

Open piranna opened 6 years ago

piranna commented 6 years ago

Set and define all templates to use re-base as a dependency so there's no duplicated code, and also would help to create new ones.

amoghbanta commented 6 years ago

This is on my mind too but I am not sure what is the right way to proceed forward with it. Any suggestions?

piranna commented 6 years ago

One easy option would be to apply re-base and later modify and tune-up the generated results, for example. Other option would be to have some kind of skeleton/placeholders/hooks so templates can attach and fill themselves.

piranna commented 6 years ago

According to react-native-cli source code, it seems to me that's possible to define dependencies on a template dummy package.json file, and since they are installed using npm install and copied its content to the current folder, then a template would have as dependency a parent template. I think it would work, and also maybe the dependencies.json file could be removed too...