Files
VERSE ebde9ba68f 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
2026-07-05 11:27:30 +07:00

77 lines
5.4 KiB
Go

package js
import (
"github.com/versenilvis/iris/spec"
)
func init() {
spec.Register(&spec.Spec{
Name: "truffle",
Description: "Execute build pipeline (if configuration present)",
Subcommands: []spec.Subcommand{
{Name: "build", Description: "Execute build pipeline (if configuration present)"},
{Name: "compile", Description: "Compile contract source files"},
{Name: "config", Description: "Set user-level configuration options"},
{Name: "get", Description: "Get a Truffle configuration option value"},
{Name: "set", Description: "Set a Truffle configuration option value"},
{Name: "console", Description: "Run a console with contract abstractions and commands available"},
{Name: "name", Description: "Network name must exist in the configuration"},
{Name: "create", Description: "Helper to create new contracts, migrations and tests"},
{Name: "ArtifactName", Description: "Name of new artifact. (required)"},
{Name: "debug", Description: "Interactively debug any transaction on the blockchain"},
{Name: "deploy", Description: "Alias for migrate. See migrate for details"},
{Name: "develop", Description: "Open a console with a development blockchaine"},
{Name: "exec", Description: "Execute a JS module within the Truffle environment"},
{Name: "help", Description: "Display a list of all commands or information about a specific command"},
{Name: "command", Description: "Display usage information about the specified command"},
{Name: "init", Description: "Initialize new and empty Ethereum project"},
{Name: "install", Description: "Install a package from the Ethereum Package Registry"},
{Name: "package_name", Description: "Name of the package as listed in the Ethereum Package Registry. (required)"},
{Name: "networks", Description: "Show addresses for deployed contracts on each network"},
{Name: "obtain", Description: "Fetch and cache a specified compiler"},
{Name: "opcode", Description: "Print the compiled opcodes for a given contract"},
{Name: "publish", Description: "Publish a package to the Ethereum Package Registry"},
{Name: "run", Description: "Run a third-party plugin command"},
{Name: "version", Description: "Show version number and exit"},
{Name: "watch", Description: "Watch filesystem for changes and rebuild the project automatically"},
{Name: "preserve", Description: "Save data to decentralized storage platforms like IPFS and Filecoin"},
{Name: "migrate", Description: "Run migrations to deploy contracts"},
{Name: "number", Description: "The number refers to the prefix of the migration file"},
{Name: "unbox", Description: "Download a Truffle Box, a pre-built Truffle project"},
{Name: "box_name", Description: "Name of the Truffle Box. (required)"},
{Name: "test", Description: "Run JavaScript and Solidity tests"},
},
Options: []spec.Option{
{Name: "--list", Description: "Compile all contracts instead of only the contracts changed since last compile"},
{Name: "--quiet", Description: "Suppress all compilation output"},
{Name: "--enable-analytics", Description: "Enable Truffle to send usage data to Google Analytics"},
{Name: "--disable-analytics", Description: "Disable Truffle's ability to send usage data to Google Analytics"},
{Name: "--network", Description: "Specify the network to use"},
{Name: "--verbose-rpc", Description: "Log communication between Truffle and the Ethereum client"},
{Name: "--require", Description: "Preload console environment from required JavaScript file"},
{Name: "--require-none", Description: "Helper to create new contracts, migrations and tests"},
{Name: "--fetch-external", Description: "Allows the debugger to compile Solidity test contracts. Implies --compile-all"},
{Name: "--compile-all", Description: "Alias for migrate. See migrate for details"},
{Name: "--log", Description: "Preload console environment from required JavaScript file"},
{Name: "--compile", Description: "Compile contracts before executing the script"},
{Name: "--force", Description: "Install a package from the Ethereum Package Registry"},
{Name: "--clean", Description: "Remove all network artifacts that aren't associated with a named network"},
{Name: "--solc", Description: "Download and cache a version of the solc compiler. (required)"},
{Name: "--environment", Description: "Environment name, as defined in truffle-config `environments` object"},
{Name: "--ipfs", Description: "Preserve to IPFS"},
{Name: "--filecoin", Description: "Preserve to Filecoin"},
{Name: "--buckets", Description: "Preserve to Textile Buckets"},
{Name: "--reset", Description: "Run contracts from a specific migration"},
{Name: "--to", Description: "Run contracts to a specific migration"},
{Name: "--dry-run", Description: "Fork the network specified and only perform a test migration"},
{Name: "--skip-dry-run", Description: "Skip the test migration performed before the real migration"},
{Name: "--interactive", Description: "Prompt to confirm that the user wants to proceed after the dry run"},
{Name: "--describe-json", Description: "Prints additional status messages"},
{Name: "--show-events", Description: "Log all contract events"},
{Name: "--debug", Description: "Allows one to rename the debug() function to something else"},
{Name: "--bail", Description: "Bail after the first test failure. May be abbreviated -b"},
{Name: "--stacktrace", Description: "Shortcut for --stacktrace --compile-all-debug"},
},
})
}