Coder Social home page Coder Social logo

devloop's Introduction

Description

Ever found yourself pressing the up arrow and enter 10 times a minute? Ever found yourself typing the same commands again and again?

No worries! Devloop to the rescue!

Usage

I've created this tool to allow a very simple workflow: Open a terminal/editor for editing code, another terminal for devloop.

Devloop allows you to recompile (and test, and whatever you want!) with just pressing Enter, and also save a lot of shortcuts to do other useful and repetitive commands.

Originally it was a shell script but the configuration file being a shell script bothered me, so I made it a rust program!

Installation

Devloop is on crates.io, so just cargo install devloop after installing Rust. Alternatively, put the binary from the Releases page somewhere in your $PATH (or %PATH%)

Configuration

Configuration is in a Devloop.toml (by default) file in the current directory.

It is a toml file. Here's an example (from this repository's Devloop.toml), along with explanations:

# This will be printed when you press q to quit
reminders = "Don't forget to format!"

# The `[[name]]` syntax in toml means that you're defining an array of tables.
# So this next section is equivalent to:
#
# tasks = [{ name = "Clippy", command = "cargo clippy -q" }]
#
# Each `[[section]]` will define one *element* in the array.

# Each task will be run in order every time you press Enter.
[[tasks]]
name = "Clippy"
command = "cargo clippy -q"

# Actions is a table where the key is the shortcut (in this case "f")
[actions.f]
name = "Format"
command = "cargo fmt"

[actions.t]
name = "Test"
command = "cargo test -q"

[actions.b]
name = "Benchmark"
command = "cargo bench -q"
pause = true  # devloop will wait for another Enter before re-running [[tasks]]

[actions.R]
name = "Build release"
command = "cargo build --release"

[actions.r]
name = "Run"
command = "cargo run"  # Another good candidate for pause=true

[actions.c]
name = "Clean"
command = "cargo clean"

devloop's People

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.