Code Monkey home page Code Monkey logo

Comments (12)

amandasaurus avatar amandasaurus commented on May 17, 2024 14

Suggestion: Use Github's new "Add a reaction" feature for voting. Add a +1 (πŸ‘) to this comment to say "I would like this feature" and -1 (πŸ‘Ž) to say "I would not like this feature"

from cargo-watch.

passcod avatar passcod commented on May 17, 2024 2

This is now done with the entirely new version 4.0.0! It will run the command upon starting by default, but you can disable the behaviour using --postpone.

from cargo-watch.

robinst avatar robinst commented on May 17, 2024 1

Used cargo watch run with a simple iron example server, and expected it to run the command.

Maybe it should be an optional thing or depend on the cargo command?

from cargo-watch.

passcod avatar passcod commented on May 17, 2024 1

I think I'm going to rebuild cargo watch to more in the model of remy's
nodemon, if you know of it, after I do Notify v3. This would include the
functionality requested in this ticket.

On Thu, 30 Jun 2016, 19:36 Robin Stocker [email protected] wrote:

Used cargo watch run with a simple iron
http://ironframework.io/doc/iron/ example server, and expected it to
run the command.

Maybe it should be an optional thing or depend on the cargo command?

β€”
You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#37 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAJgi3Z3-9fQMromw_IX0ARbfF3D1YRUks5qQ3HsgaJpZM4Hxa-W
.

from cargo-watch.

passcod avatar passcod commented on May 17, 2024 1

πŸ‘ Going to do this. Don't have an ETA, but it's on the todolist.

from cargo-watch.

passcod avatar passcod commented on May 17, 2024

I'm of either mind on this, so I'll wait for community feedback too.

from cargo-watch.

aij avatar aij commented on May 17, 2024

Yes please.

On Tue, Mar 15, 2016, 4:41 PM FΓ©lix Saparelli [email protected]
wrote:

I'm of either mind on this, so I'll wait for community feedback too.

β€”
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#37 (comment)

from cargo-watch.

passcod avatar passcod commented on May 17, 2024

Also comment with your use case if it is different from the top-post. I'd love to have more insight into why people would want one or the other.

from cargo-watch.

shepmaster avatar shepmaster commented on May 17, 2024

I'm all for this as I wanted to watch a server, so the first run before anything changes is definitely useful. One alternate thing is to allow pressing Enter to trigger a build, regardless of the state of files. I believe that guard allows something similar.

from cargo-watch.

passcod avatar passcod commented on May 17, 2024

Nodemon does it by typing rs then Enter, which guards against restarting inadvertently if an interactive program is watched, or if one likes to use blank lines to visually separate runs when doing verbose debugging. That's probably what I'll go with. I use nodemon all the time, it's a very useful tool β€” it is very much the vision for cargo watch.

Speaking of, as much as I'd like to keep users here, I have no illusion of being able to bring it to greatness any time soon, so if you happen to have npm/node installed and want a very good cargo-watch alternative, go with nodemon:

# With long options for clarity:
$ nodemon --ext rs,toml --exec 'cargo run' --watch src --watch test --watch examples

# Short options for brevity:
$ nodemon -e rs,toml -x 'cargo run' -w src -w test -w examples

That should have the requisite behaviour.

from cargo-watch.

robinst avatar robinst commented on May 17, 2024

For other people landing here, there's now also a nodemon-like tool written in Rust: https://github.com/mattgreen/watchexec/

$ watchexec --restart "cargo run"

Edit: Removed --run-initially

from cargo-watch.

passcod avatar passcod commented on May 17, 2024

Note that --run-initially is the default now, so you don't need to specify it.

from cargo-watch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.