Comments (6)
Note: We should actually also do some smart resolution here because cargo run
makes no sense for libraries.
If src/lib.rs
exists, then exec_commands should be cargo test
from lightmon.
This is actually kind of tricky because for each subcommand of cargo
there are so many flags people probably want to use. Either we can support them, or just tell them to use shell
mode.
While I do think that's definitely the solution for very custom usages, I think we should support some popular flags, for example:
build
has many popular flags: --lib
, --bin name
, --features features
, --all-features
, --release
, --target-dir directory
, --out-dir directory
, etc.
Which ones should we support?
from lightmon.
@alayshahh How do you think we should go about supporting the arguments to the subcommands. The linked PR has working subcommands but you can't pass any arguments into it yet, still waiting to figure out how we want to do this.
from lightmon.
It might be a but difficult without the lightmon.toml file. If we can we can store args for the different cargo sub commands like this. Another adaptation we can have is take anything after the 'lightmon rust' arg and pass it to the command. If no args, we can just default to 'cargo run'
from lightmon.
Yea because I don't want to not have some features and would rather have a dynamic way to allow all flags (current and new ones in the future).
For example, running lightmon rust doc --arg1 foo --bar bazz
would pass --arg1 foo --bar bazz
to cargo doc
without us having to specify the arguments explicitly in cli.yaml
from lightmon.
@alayshahh The latest commit to the PR fixes this and makes the usage must more expressive and realistic.
Any subcommands after lightmon rust
get parsed using clap's AppSetting::ExternalSubcommands
global setting. This means the following:
lightmon rust build --bin my_bin --all-targets
Will resolve the exec command as cargo build --bin my_bin --all-targets
from lightmon.
Related Issues (18)
- Make output messages more user friendly and informative HOT 1
- Restart program without killing lightmon HOT 1
- Add poll watcher duration as a cli argument
- `cli::build_node_config()` should be smarter
- Load arguments from config file HOT 1
- Kill exec child when file changes cause restart
- Improve documentation for docs-rs
- Add CHANGELOG
- Add more installation methods HOT 3
- Parse nodemon.json config files HOT 1
- Allow arguments to be passed in to override params in the install script HOT 2
- Apple M1 Support
- Add golang support
- Include STDERR to output
- Implement automatic language resolution HOT 2
- Build out test suite
- For shell mode: Ensure that path to shell script actually exists. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightmon.