@zicenter/swift-cli
v2.1.11
Published
Open CLI
Downloads
4
Readme
zicenter swift-cli
Zicenter Open CLI
Usage
$ npm install -g @zicenter/swift-cli
$ lyte COMMAND
running command...
$ lyte (-v|--version|version)
@zicenter/swift-cli/2.1.11 linux-x64 node-v14.18.1
$ lyte --help [COMMAND]
USAGE
$ lyte COMMAND
...
Run below commands commands to create fresh nodejs project
npm init -y
touch index.js
npm install @zicenter/swift-cli
Now add below to your package.json (replace "example" with the name of your cli app)
"bin": {
"example": "index.js"
},
Lastly and optionally, put below js code in index.js and create 2 directories, "commands" & "templates" in the root directory
#! /usr/bin/env node
const path = require("path");
require('@zicenter/swift-cli').default({
templatePath: path.resolve('templates'),
commandsPath: path.resolve('commands')
})
See code: example/index.js