refactor(commands): separate commands and its core into two folders (#32)
- I think it would be better if one for commands only, one for the spec handling core logic so people won't be confused by the core logic inside the commands folder (cleaner I guess) - Regen docs
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
package rust
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "cargo",
|
||||
Description: "rust toolchain",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "build", Description: "compile project",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--release", Description: "optimized build"},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package rust
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "dprint",
|
||||
Description: "Prints the help of the given subcommand(s)",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "init", Description: "Initializes a configuration file in the current directory"},
|
||||
{Name: "fmt", Description: "Formats the source files and writes the result to the file system"},
|
||||
{Name: "check", Description: "Checks for any files that haven't been formatted"},
|
||||
@@ -19,7 +19,7 @@ func init() {
|
||||
{Name: "clear-cache", Description: "Deletes the plugin cache directory"},
|
||||
{Name: "license", Description: "Outputs the software license"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--excludes", Description: "A pluggable and configurable code formatting platform written in Rust"},
|
||||
{Name: "--diff", Description: "Outputs a check-like diff of every formatted file"},
|
||||
{Name: "--stdin", Description: "Checks for any files that haven't been formatted"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package rust
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "pijul",
|
||||
Description: "Adds a path to the tree",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "add", Description: "Adds a path to the tree"},
|
||||
{Name: "PATHS", Description: "Paths to add to the internal tree"},
|
||||
{Name: "apply", Description: "Applies changes to a channel"},
|
||||
@@ -42,7 +42,7 @@ func init() {
|
||||
{Name: "unrecord", Description: "Unrecords a list of changes"},
|
||||
{Name: "CHANGE_ID", Description: "The hash of a change (unambiguous prefixes are accepted)"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-f", Description: "Print help information"},
|
||||
{Name: "-r", Description: "Applies changes to a channel"},
|
||||
{Name: "--channel", Description: "Apply change to this channel"},
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
package rust
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "rustc",
|
||||
Description: "Rust compiler",
|
||||
Generator: core.FileGenerator(".rs"),
|
||||
Options: []core.Option{
|
||||
Generator: spec.FileGenerator(".rs"),
|
||||
Options: []spec.Option{
|
||||
{Name: "-o", Description: "output file"},
|
||||
{Name: "--edition", Description: "Rust edition (2015/2018/2021/2024)"},
|
||||
{Name: "--crate-type", Description: "crate type (bin/lib/dylib/cdylib/rlib)"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package rust
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "rustup",
|
||||
Description: "The Rust toolchain installer",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "show", Description: "Show the active and installed toolchains or profiles"},
|
||||
{Name: "active-toolchain", Description: "Show the active toolchain"},
|
||||
{Name: "home", Description: "Display the computed value of RUSTUP_HOME"},
|
||||
@@ -37,7 +37,7 @@ func init() {
|
||||
{Name: "auto-self-update", Description: "The rustup auto self update mode"},
|
||||
{Name: "completions", Description: "Generate tab-completion scripts for your shell"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-h", Description: "Prints help information"},
|
||||
{Name: "--force", Description: "Force an update, even if some components are missing"},
|
||||
{Name: "--force-non-host", Description: "Prints help information"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package rust
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "taplo",
|
||||
Description: "Set color values for the output",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "config", Description: "Operations with the Taplo config file"},
|
||||
{Name: "default", Description: "Print the default `.taplo.toml` configuration file"},
|
||||
{Name: "help", Description: "Print this message or the help of the given subcommand(s)"},
|
||||
@@ -22,7 +22,7 @@ func init() {
|
||||
{Name: "stdio", Description: "Run the language server over the standard input and output"},
|
||||
{Name: "tcp", Description: "Run the language server and listen on a TCP address"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--colors", Description: "Set color values for the output"},
|
||||
{Name: "--verbose", Description: "Enable verbose logging format"},
|
||||
{Name: "--log-spans", Description: "Enable logging spans"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package rust
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "tokei",
|
||||
Description: "Count your code, quickly",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-f", Description: "Will print out statistics on individual files"},
|
||||
{Name: "-h", Description: "Prints help information"},
|
||||
{Name: "--hidden", Description: "Count hidden files"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package rust
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "trunk",
|
||||
Description: "Run on all files instead of only changed files",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "init", Description: "Setup trunk in this repo"},
|
||||
{Name: "check", Description: "Universal code checker"},
|
||||
{Name: "upgrade", Description: "Upgrade all linters to latest versions"},
|
||||
@@ -28,7 +28,7 @@ func init() {
|
||||
{Name: "shutdown", Description: "Shutdown the trunk daemon if it is running"},
|
||||
{Name: "status", Description: "Report daemon status"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-a", Description: "Run on all files instead of only changed files"},
|
||||
{Name: "-n", Description: "Don't automatically apply fixes"},
|
||||
{Name: "--include-existing-autofixes", Description: "Show autofixes for existing issues"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package rust
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "wasm-bindgen",
|
||||
Description: "Generate bindings between WebAssembly and JavaScript",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--help", Description: "Show help for wasm-bindgen"},
|
||||
{Name: "--version", Description: "Show version for wasm-bindgen"},
|
||||
{Name: "--out-dir", Description: "Output directory"},
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package rust
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "wasm-pack",
|
||||
Description: "Build an npm package",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "help", Description: "Prints this message or the help of the given subcommand(s)"},
|
||||
{Name: "test", Description: "Run tests for WebAssembly module"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--help", Description: "Show help for wasm-pack or for the given subcommand(s)"},
|
||||
{Name: "--quiet", Description: "Suppress output from stdout"},
|
||||
{Name: "--version", Description: "Show version for wasm-pack"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package rust
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "zellij",
|
||||
Description: "Change where zellij looks for the configuration file",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-c", Description: "Change where zellij looks for the configuration file"},
|
||||
{Name: "--config-dir", Description: "Change where zellij looks for the configuration directory"},
|
||||
{Name: "-d", Description: "Specify emitting additional debug information"},
|
||||
|
||||
Reference in New Issue
Block a user