Code Monkey home page Code Monkey logo

xwc's Introduction

简介

类似linux的alias命令,用来简化命令调用。

如何使用

  1. 初始化配置文件
xwc init
  1. 初始化配置文件以后,会在项目根目录生成xwc.yml, 具体文件内容如下:
enviroment:

- your_enviroment: your_enviroment # 环境变量

command:

  your_command: your_command # 需要简写的命令

  1. 配置文件完整案例
enviroment:
  - UC_MIGRATE_DATABASE: mysql://user:password@tcp(host:port)/dbname?x-migrations-table=migrations
command:
  http: gin -p 8080 -a 8080 --immediate -b uc run http
  doc: swag init
  migrate-create : migrate -database $UC_MIGRATE_DATABASE create -ext sql -dir migrations
  migrate: migrate -database $UC_MIGRATE_DATABASE -path migrations

  1. 运行 xic -h
Usage:
  xwc [command]

Available Commands:
  doc            Exec: swag init
  help           Help about any command
  http           Exec: gin -p 8080 -a 8080 --immediate -b uc run http
  init           Init config file
  migrate        Exec: migrate -database $UC_MIGRATE_DATABASE -path migrations
  migrate-create Exec: migrate -database $UC_MIGRATE_DATABASE create -ext sql -dir migrations

Flags:
  -h, --help   help for xwc

Use "xwc [command] --help" for more information about a command.
  1. xwc http 会执行 gin -p 8080 -a 8080 --immediate -b uc run http

xwc's People

Contributors

wpajqz avatar

Watchers

 avatar James Cloos avatar

Forkers

adamfu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.