Giter Site home page Giter Site logo

loadii's Introduction

loadii

A CLI tool to watch file changes and execute a command

Usage

$ loadii --help
A CLI tool to watch file changes and execute a command

USAGE:
  loadii [flags]

FLAGS:
  -go:[path] [args]        Run 'go run [path] [args]'
  -pnpm:[path]             Run 'pnpm run dev [path]'
  -pnpm:[path] [script]    Run 'pnpm run [script] [path]'
  -serve                   Serve
  -help                    Show help
  -v -version              Print the version

モチベーション

次のような課題があり、コマンド一つで解決できないか探っている

  • ウェブサーバをぱっと立ち上げたい時があるが nginx や apache のセットアップは面倒
  • ファイル編集をトリガーにビルドを走らせたい時がある (HMRではない)
  • Go + フロントエンドの開発をするとき go run .pnpm dev をそれぞれ実行する必要があり面倒

Planning Usage [Refactor]

loadii -i # interactive. scan which language is used and predict dev command
loadii -i -d 4 # scan sub-dirs with 4 depth. defalut depth is 2
loadii -go # run `go run .`
loadii -go -pnpm:ui # run `go run .` and `cd ./ui && pnpm dev`
loadii -go sub subsub -pnpm:ui
loadii -go 'sub subsub' -pnpm:ui
loadii -go 'sub subsub --flag' -pnpm:ui -i
loadii -serve # serve .

loadii's People

Contributors

enuesaa avatar

Watchers

 avatar

loadii's Issues

Proposal: Remove subcommands and make them flags

About

  • Remove subcommands
  • Make them flags

Example usage

# This only watches file changes
loadii

# This watches file changes and also serve files in `./dist` and 3000 is the serving port
loadii --serve ./dist

# This watches file changes and also serve files in `./dist` and 3001 is the serving port
loadii --serve ./dist --port 3001

# This watches file changes and execute `go run .` when file change detected.
loadii go run .

# This watches file changes and execute `go run .` in `./example/simple`dir
loadii -w ./example/simple go run .

# This watches file changes and execute `pnpm build` when file change detected and also serve files in `./dist`
loadii --serve ./dist pnpm build

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.