cli/mod.rs
1#![deny(
2 future_incompatible,
3 keyword_idents,
4 let_underscore,
5 nonstandard_style,
6 unused
7)]
8#![warn(unknown_lints)]
9
10//! # cargo-make
11//!
12//! Rust task runner and build tool.<br>
13//! The cargo-make task runner enables to define and configure sets of tasks and run them as a flow.<br>
14//! A task is a command or a script to execute.<br>
15//! Tasks can have dependencies which are also tasks that will be executed before the task itself.<br>
16//! With a simple toml based configuration file, you can define a multi platform build script that can run build, test,
17//! documentation generation, bench tests execution, security validations and more by running a single command.
18//!
19//! ## Installation
20//! In order to install, just run the following command
21//!
22//! ```sh
23//! cargo install cargo-make
24//! ```
25//!
26//! This will install cargo-make in your ~/.cargo/bin.<br>
27//! Make sure to add ~/.cargo/bin directory to your PATH variable.
28//!
29//! # Contributing
30//! See [contributing guide](https://github.com/sagiegurari/cargo-make/blob/master/.github/CONTRIBUTING.md)
31//!
32//! # License
33//! Developed by Sagie Gur-Ari and licensed under the
34//! [Apache 2](https://github.com/sagiegurari/cargo-make/blob/master/LICENSE) open source license.
35//!
36
37// Dependencies used in the binary `makers`:
38use crate::error::CargoMakeError;
39use crate::types::CliArgs;
40#[cfg(windows)]
41use nu_ansi_term as _;
42
43#[macro_use]
44extern crate log;
45#[macro_use]
46extern crate serde_derive;
47
48#[cfg(test)]
49mod test;
50
51// make types public for docs
52pub mod types;
53
54mod cache;
55pub mod cli;
56pub mod cli_commands;
57pub mod cli_parser;
58mod command;
59pub mod completion;
60mod condition;
61pub mod config;
62mod descriptor;
63mod environment;
64pub mod error;
65mod execution_plan;
66mod functions;
67mod installer;
68mod io;
69mod legacy;
70pub mod logger;
71mod plugin;
72mod profile;
73mod proxy_task;
74mod recursion_level;
75pub mod runner;
76mod scriptengine;
77mod storage;
78mod time_summary;
79mod toolchain;
80mod version;
81
82/// Handles the command line arguments and executes the runner.
83pub fn run_cli(command_name: String, sub_command: bool) -> Result<CliArgs, CargoMakeError> {
84 cli::run_cli(command_name, sub_command)
85}