status-im / status-fiddle

Online UI editor for status-react
10 stars 9 forks source link

Configure project so react-native-web npm lib can be used in reagent forms #2

Closed foopang closed 6 years ago

foopang commented 6 years ago

Fix #1

@flexsurfer Since there is no CLJS binding yet for react-native-web, I used this as reference http://blob.tomerweller.com/reagent-import-react-components-from-npm

Please advise if it is good enough for the use case.

flexsurfer commented 6 years ago

thanks @foopang! testing, it looks like it works :)

foopang commented 6 years ago

Updated :)

foopang commented 6 years ago

@flexsurfer @pesterhazy thanks for reviewing! I've made the necessary changes accordingly.

foopang commented 6 years ago

Sorry, wasn't aware that there is min CLJS build needs for the update as well. I fixed in this commit ca3e60f3801d23b246aa8145199ca722284b9072 with a slightly different approach - to keep one build ID only and use profiles to control CLJS build settings, because I wanted to avoid having to duplicate some common parts of CLJS build settings for each build. The common parts of CLJS build settings have been extracted as one app build, all profile section CLJS build settings are built on top of it. Not sure if it is a good practice, it works like this now lein with-profile <profile-id> ...

flexsurfer commented 6 years ago

thanks @foopang , could you please add aliases for dev and prod? lein figwheel-repl and lein build-prod and add this info into README, thanks

foopang commented 6 years ago

@flexsurfer Updated. Thanks! You merged so quickly :)

ghost commented 6 years ago

I think Readme.md is missing Webpack documentation. It just does not run with 'lein figwheel-repl' after cloning.

sudo npm install -g webpack webpack -p

don't worry. I will add it to my commit.

foopang commented 6 years ago

@poiga thanks for noticing! I submitted a PR for the missing setup https://github.com/status-im/status-fiddle/pull/4