From 771555ba78bab95985dfcecb7bba4211f62023d3 Mon Sep 17 00:00:00 2001 From: Dan Reeves Date: Mon, 10 Sep 2018 00:44:55 +0100 Subject: [PATCH] some nice stuff --- Cargo.toml | 6 ++++-- LICENSE | 9 +++++++++ README.md | 29 +++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 LICENSE create mode 100644 README.md diff --git a/Cargo.toml b/Cargo.toml index d9b2c17..8c05bc4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,8 @@ name = "cargo-cmd" version = "0.1.0" authors = ["Dan Reeves "] +repository = "https://github.com/danreeves/cargo-cmd" +license = "MIT" [dependencies] toml = "0.4.6" @@ -10,5 +12,5 @@ serde = "1.0.78" subprocess = "0.1.13" [package.metadata.commands] -echo = "echo Hello planet!" -dev = "cargo watch -s 'clear; cargo build && cargo cmd echo'" +greet = "echo 'Hello, planet!'" +dev = "cargo watch -s 'clear; cargo build && cargo cmd greet'" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d8b09cc --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +The MIT License + +Copyright 2018 Dan Reeves + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..08ac050 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# cargo-cmd + +Like `npm` scripts, but for `cargo`. + +## Installation + +```sh +cargo install cargo-cmd +``` + +## Usage + +You can define your commands in `Cargo.toml` under the `[package.metadata.commands]` table, like so: + +```toml +[package.metadata.commands] +greet = "echo 'Hello, planet!'" +``` + +Now you can run `cargo cmd greet`: + +```sh +$ cargo cmd greet +> echo 'Hello, planet!' +Hello, planet! +``` + +## License +[MIT © Dan Reeves](./LICENSE)