1.0.0 • Published 4 years ago

condiments-cli v1.0.0

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

Condiments

A small cli tools (based on nodejs environment)

version: 1.0.0

Installation

npm install -g condiments
# or
yarn add -g condiments

After package installed, initialized it:

cond init

Usage for Files

Save Files

Save your file or folder to condiments library:

cond save path/your.file -a alias_name
cond save path/folder

Without option -a (--alias), your will be ask to specify one after you run it.

Load Files

After you saved your files. You can load them by alias anytime.

cond load alias_name -d ./
cond load myFolder

Without option -d (--dist), files will be load to current directory.

You can use -b (--bare) to load folder files in flat way:

# fe-component folder: component.html, component.js, component.css

cond load fe-component -d ./my-component
# result: ./my-component/fe-component/...html, ...js, ...css

cond load fe-component -d ./my-component
# result: ./my-component/...html, ...js, ...css

List Files

After files saved, you can list them to the terminal:

cond files ls

Remove and Clean Files

Remove file or folder by its alias:

cond files rm alias_name

Remove all by use clean command:

cond files clean

Usage for Scripts

For running script, only Linux / Unix shell and Powershell are supported now.

Save Scripts

Save script code snippet:

cond script { ls -la } -a alias_name1
cond script "ping baidu.com" -a alias_name2

Save script file:

cond script script_a.ps1 -a script_a
cond script script_b.sh -a script_b

Run Saved Scripts

cond run alias_name

List Scripts

cond scripts ls

Remove and Clean Scripts

Remove script by its alias:

cond scripts rm alias_name

Remove all by use clean command:

cond scripts clean