tidepool-org / tools

A place to put tooling and scripts that help when working on Tidepool stuff.
Other
11 stars 11 forks source link

Updating runservers for webpack front-end apps #18

Open nicolashery opened 10 years ago

nicolashery commented 10 years ago

Before updating the script, wanted to discuss how you guys use runservers and see what would be best for Blip and Clamshell...

Basically, the npm start commands now used by Blip and Clamshell for local development aren't great to be run in the background (they show progress, watch files and rebuild, and npm run-scripts doesn't return the PID for an easy kill). They're good to run in a separate terminal when you're working on that particular app. I tend to comment out the tp_blip in the runserver script when I'm working on Blip with a local platform, and run Blip's development script in a separate terminal (easy to ctrl+c and restart too).

So for the runservers script, I'd like to just fire node develop.js for Blip and Clamshell, which quickly starts a static server. But you need to have Blip and Clamshell built with a local config in their dist/ directories (can take 30s-1min on MacBooks). The question is: do we want to do that in the runservers script (which will slow it down, plus you don't need to rebuild every time unless you're working on that app), or should it be in a separate script, or simply as separate instructions?

Building either app for local development is:

$ cd blip/
$ git pull origin master
$ npm install
$ source config/local.sh # we can check this in the repo
$ npm run build

And then the runservers script could just fire node server.js.

Let me know if things are unclear, and happy to hear your thoughts.

Thanks!

cheddar commented 10 years ago

I'm +1 for runservers doing the work. I've had a couple times where I forgot to run something in blip or clamshell and wasted a bunch of effort debugging something that was just me not doing the proper steps. Having the proper steps in runservers (and maybe having them go really quickly if they are already completed) is my preference.

--Eric

On Mon, Aug 11, 2014 at 12:12 PM, Nicolas Hery notifications@github.com wrote:

Before updating the script, wanted to discuss how you guys use runservers and see what would be best for Blip and Clamshell...

Basically, the npm start commands now used by Blip and Clamshell for local development aren't great to be run in the background (they show progress, watch files and rebuild, and npm run-scripts doesn't return the PID for an easy kill). They're good to run in a separate terminal when you're working on that particular app. I tend to comment out the tp_blip in the runserver script when I'm working on Blip with a local platform, and run Blip's development script in a separate terminal (easy to ctrl+c and restart too).

So for the runservers script, I'd like to just fire node develop.js for Blip and Clamshell, which quickly starts a static server. But you need to have Blip and Clamshell built with a local config in their dist/ directories (can take 30s-1min on MacBooks). The question is: do we want to do that in the runservers script (which will slow it down, plus you don't need to rebuild every time unless you're working on that app), or should it be in a separate script, or simply as separate instructions?

Building either app for local development is:

$ cd blip/$ git pull origin master$ npm install$ source config/local.sh # we can check this in the repo$ npm run build

And then the runservers script could just fire node server.js.

Let me know if things are unclear, and happy to hear your thoughts.

Thanks!

— Reply to this email directly or view it on GitHub https://github.com/tidepool-org/tools/issues/18.

kentquirk commented 10 years ago

Don't break the model of using runservers to just work on backend stuff, please.

I often just do a runservers, then test something backend, and never touch blip or clamshell. I've even been considering adding an option to runservers so I don't have to do those builds.

On Mon, Aug 11, 2014 at 2:09 PM, cheddar notifications@github.com wrote:

I'm +1 for runservers doing the work. I've had a couple times where I forgot to run something in blip or clamshell and wasted a bunch of effort debugging something that was just me not doing the proper steps. Having the proper steps in runservers (and maybe having them go really quickly if they are already completed) is my preference.

--Eric

On Mon, Aug 11, 2014 at 12:12 PM, Nicolas Hery notifications@github.com wrote:

Before updating the script, wanted to discuss how you guys use runservers and see what would be best for Blip and Clamshell...

Basically, the npm start commands now used by Blip and Clamshell for local development aren't great to be run in the background (they show progress, watch files and rebuild, and npm run-scripts doesn't return the PID for an easy kill). They're good to run in a separate terminal when you're working on that particular app. I tend to comment out the tp_blip in the runserver script when I'm working on Blip with a local platform, and run Blip's development script in a separate terminal (easy to ctrl+c and restart too).

So for the runservers script, I'd like to just fire node develop.js for Blip and Clamshell, which quickly starts a static server. But you need to have Blip and Clamshell built with a local config in their dist/ directories (can take 30s-1min on MacBooks). The question is: do we want to do that in the runservers script (which will slow it down, plus you don't need to rebuild every time unless you're working on that app), or should it be in a separate script, or simply as separate instructions?

Building either app for local development is:

$ cd blip/$ git pull origin master$ npm install$ source config/local.sh

we can check this in the repo$ npm run build

And then the runservers script could just fire node server.js.

Let me know if things are unclear, and happy to hear your thoughts.

Thanks!

— Reply to this email directly or view it on GitHub https://github.com/tidepool-org/tools/issues/18.

— Reply to this email directly or view it on GitHub https://github.com/tidepool-org/tools/issues/18#issuecomment-51817724.

Kent Quirk VP of Engineering, Tidepool

Tidepool is an open source, not-for-profit effort to build an open data platform and better applications to reduce the burden of Type 1 Diabetes.

nicolashery commented 10 years ago

Yes @kentquirk, that's exactly what I was thinking. I consider runservers to be more of a "run Tidepool backend locally" thing, and I usually always have blip and clamshell commented out in there. Maybe it's worth thinking about creating two scripts?

Anyway, I just saw your comment after pushing my PR. Let me know what you think?