Replies: 16 comments
-
Closing in favor of #1259, since that issue has more detailed description. |
Beta Was this translation helpful? Give feedback.
-
This task is related but not the same ... I would say this is blocked by #1259 not a duplicate. This is a CLI improvement using the implementation of #1259 This is a proposal to add a |
Beta Was this translation helpful? Give feedback.
-
If it was decided we don't want to implement this at all I'm ok to close it (with a message saying that). |
Beta Was this translation helpful? Give feedback.
-
This is how I
The first one ( The second approach uses the incremental compiler, but I do have to run two separate commands! (I use two terminal panes for that.) But it is certainly worthwhile: development goes much faster. Occasionally the contents of I also have a It would be great to have all (three?) tasks in one command, but at least this setup is working well for us right now. |
Beta Was this translation helpful? Give feedback.
-
@joeytwiddle Projects scaffolded using the |
Beta Was this translation helpful? Give feedback.
-
Yes you are right, I only tweaked the existing I would be happy to do that. But are you devs happy to add the extra Edit: Or perhaps |
Beta Was this translation helpful? Give feedback.
-
I think as long as the CLI scaffolding the app gives an option to have cc: @strongloop/sq-lb-apex @strongloop/loopback-next @raymondfeng @bajtos |
Beta Was this translation helpful? Give feedback.
-
I like that with To address this limitation, I am proposing to integrate
Alternatively, we can introduce a new command Either way, by exposing Regarding I don't have a strong opinion whether this solution should be Adding an option allowing users to opt-out of watch mode (and thus a dependency on nodemon) in a fashion similar to how they can opt-out of |
Beta Was this translation helpful? Give feedback.
-
FWIW, I think the implementation of What I am trying to say: if we decide to use |
Beta Was this translation helpful? Give feedback.
-
FWIW, auto-selection of compilation target & dist folder is no longer a problem, we have removed this feature while preparing for TypeScript Project References & Build mode - see #1803 |
Beta Was this translation helpful? Give feedback.
-
This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the |
Beta Was this translation helpful? Give feedback.
-
The current release of loopback seems to use As a result, I have stopped using a separate watcher, and I now do everything in one process: "prestart": "npm run build",
// Loopback's bundled start script, which does not respond to changes
"start": "node -r source-map-support/register .",
// Use start:watch instead. After a change it will trigger prestart and start
"start:watch": "nodemon -e '*' -w src -d 2 -x 'npm run start' || exit 1", This takes a few seconds to update the build and restart the server, but I find the simplicity (only needing one terminal window) is worth the price. I do the same with (Something similar might be possible with I'm also not wedded to There are also a few alternatives to nodemon, for example three were described in this 2013 Strongloop blog post. 🙂 |
Beta Was this translation helpful? Give feedback.
-
@bajtos had a proposal in #1234 (comment). @raymondfeng, any thoughts on which option to adopt to go forward? Thanks. |
Beta Was this translation helpful? Give feedback.
-
@dhmlau, @bajtos : As per my observation the global trends says that most of the developer use nodemon for watch configuration of their projects, Also in this particular thread and other thread related to debug and watch most of the developer found easy integration with nodemon.
in looback itself which may be a future feature with lbs' own watcher. we may put it for feature for future. |
Beta Was this translation helpful? Give feedback.
-
Please note the comment above is no longer true. At the moment, @madaky I think You can also use the solution described by @joeytwiddle in #1234 (comment). I guess the next step is to decide which solution we want to promote as "the right LoopBack way" and then update our CLI project templates to setup that solution for new projects, i.e. add "start:watch" script after "start": |
Beta Was this translation helpful? Give feedback.
-
Please take the decision; This issue opened in 2018! |
Beta Was this translation helpful? Give feedback.
-
Description / Steps to reproduce / Feature proposal
Projects scaffolded and started using the CLI have a start script but any changes such as adding new controllers requires us to manually restart the server. This should be automated using
tsc
watch mode imo similar to how angular does it for it's projects.I would propose to even go as far as creating a
lb4 serve
/lb4 start
command similar to angular that can accomplish the watch mode for development purposes whilenpm start
can be without watch mode for use in production.Current Behavior
Restart the app manually when a new controller is added.
Expected Behavior
App restarts automatically once a new controller has been added to the project.
Beta Was this translation helpful? Give feedback.
All reactions