CLI-Command line tool
suchjs provides a command-line tool such-cli, which has two main purposes:
- 1. When using suchjs in node, it is used to initialize the configuration files supported in the node environment and the creation of data directory folders, etc.
- 2. Use the such command on the command line to create mock data
- 1. Only used to initialize suchjs project configuration
-
# Use yarn yarn add -D such-cli # Use npm npm install --save-dev such-cli # Use pnpm pnpm add -D such-cli
After installation
# Initialize the project npx such init
- 2. Use on the command line
-
# 1. Global installation, take yarn as an example yarn global add such-cli # After installation ## Write a mock string to a.txt file such as :string > a.txt ## print a mock object such as '{"string{3}": ":string"}' ## Serialize the print object string such as '{"string{3}": ":string"}' --stringify # 2. local installation yarn add -D such-cli ## local use npx such :string ## Configure local extensions npx such init
For detailed usage, you can see more details in the README of Github Such-cli repository