spring-attic / tut-react-and-spring-data-rest

React.js and Spring Data REST :: A tutorial based on the 5-part blog series by Greg Turnquist
https://spring.io/guides/tutorials/react-and-spring-data-rest
882 stars 1.58k forks source link

How to npm run-script watch #77

Closed mbalande1 closed 6 years ago

mbalande1 commented 6 years ago

"Want to see your JavaScript changes automatically? Run npm run-script watch to put webpack into watch mode. It will regenerate bundle.js as you edit the source"

I am a bit new in this, could you please give me a bit more detail on to how to do this?

mbalande1 commented 6 years ago

Hi. I would really appreciate if someone could answer this. Thanks

Malcolm-X commented 6 years ago

Hi mbalande1,

in order to run the watch script, you will need the package.json file from repository. Unfortunately this tutorial does not go into much detail about this section although it is said in the beginning, that you can do it by hand.

In the package.json you will find an object script. The script you are looking for is defined here and as you will see it will call the webpack modue with the -- watch option and -d switch.

TL;DR to run the watch scrupt you need the package.json and node.js Best Regards

gregturn commented 6 years ago

Resolved via https://github.com/spring-guides/tut-react-and-spring-data-rest/commit/a35840993a548b46643d0446337c57e09820c4ef