2.1.11 • Published 3 years ago

@zicenter/swift-cli v2.1.11

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

zicenter swift-cli

Zicenter Open CLI

Version Downloads/week License

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