electricitymaps / bloom-contrib

Making carbon footprint data available to everyone.
https://www.bloomclimate.com
MIT License
436 stars 104 forks source link

Create React Frontend for Dev Playground #161

Closed ovbm closed 4 years ago

ovbm commented 4 years ago

Would be great to use react as a front-end for the playground.

corradio commented 4 years ago

The main thing we're trying to achieve here is to avoid having a bundler for the frontend as a separate process. Will think about ideas on how to proceed. One way is to have a watch script for those who want to work on the frontend, and commit dist files such that people who want to work on integrations can do it without running the bundler.

I'll think about a potential architecture

ovbm commented 4 years ago

I actually made it work by adding a proxy to the react app

mohinderps commented 4 years ago

Got it to run after adding @babel/plugin-proposal-class-properties, @babel/plugin-transform-runtime and babel-plugin-wildcard in the package.json.

corradio commented 4 years ago

hum - weird. Did you have to add it in the root package.json or in the playground package.json?

On Mon, Sep 30, 2019 at 2:49 PM Mohinder Saluja notifications@github.com wrote:

Got it to run after adding @babel/plugin-proposal-class-properties, @babel/plugin-transform-runtime and babel-plugin-wildcard in the package.json.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tmrowco/tmrowapp-contrib/issues/161?email_source=notifications&email_token=AAMUIKFL35U6B6KXHDNYKBLQMHYUHA5CNFSM4I3GDP6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD75QUQQ#issuecomment-536545858, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMUIKAVV3ZNLHUDHAIQ6XLQMHYUHANCNFSM4I3GDP6A .

--

Olivier Corradi

Founder, CEO

https://www.linkedin.com/in/oliviercorradi https://twitter.com/corradio

tmrow.com

mohinderps commented 4 years ago

root package.json

batbyR commented 4 years ago

Same problem for me but I had only to install @babel/plugin-proposal-class-properties.

micheljp commented 4 years ago

Shouldn't @babel/plugin-proposal-class-properties be added to the package.json then? Cloning the repo and running yarn followed by yarn serve gets you a module not found error. Need to run yarn in root dir also. This isn't in documentation.