Giter VIP home page Giter VIP logo

scripts-to-rule-them-all's Introduction

Scripts To Rule Them All

This is a WIP repo to form some opinions on my own version of the "Scripts To Rule Them All" standard for my projects.

I'm using just instead of Make or external files because it fits my brain better. It also allows me to avoid make vs. gmake differences.

When my just recipes get too large, I turn them into an external file stored in a scripts folder, and I call them from a just recipe. This can be scripts/bootstrap.sh or scripts/bootstrap.py, depending on which language the recipe is written in.

Usage

❯ just
Available recipes:
    bootstrap *ARGS # installs/updates all dependencies
    check           # run '--fmt' in "check" mode.
    cibuild         # invoked by continuous integration servers to run tests
    console         # opens a console
    docs            # updates our README when justfile changes
    fmt             # format and overwrite justfile
    format          # alias for `fmt`
    lint            # check/lint our project
    server          # starts app
    setup           # sets up a project to be used for the first time
    test            # runs tests
    update          # updates a project to run at its current version

Summary view

The summary view might be nice for linting or scripting to see what options are available with less parsing.

❯ just --summary
bootstrap check cibuild console docs fmt lint server setup test update

Recipes

bootstrap recipe

$ just bootstrap
source
# installs/updates all dependencies
@bootstrap *ARGS:
    #!/usr/bin/env bash

    set -euo pipefail

    # we use cogapp to update our README
    pip install cogapp

    # setup our project defaults if they exist
    if [ ! -f ".env" ]; then
        echo ".env created"
        cp .env.example .env
    fi

    if [ ! -f "docker-compose.override.yml" ]; then
        echo "docker-compose.override.yml created"
        cp docker-compose.override.yml.example docker-compose.override.yml
    fi

    # [ ] uncomment if we are using Docker
    # docker-compose {{ ARGS }} build --force-rm

    # [ ] uncomment if we are using pre-commit
    # python -m pip install --upgrade pre-commit

check recipe

$ just check
source
# run '--fmt' in "check" mode.
@check:
    just --check --fmt --unstable

cibuild recipe

$ just cibuild
source
# invoked by continuous integration servers to run tests
@cibuild:
    echo "TODO: cibuild"

console recipe

$ just console
source
# opens a console
@console:
    echo "TODO: console"

docs recipe

$ just docs
source
# updates our README when justfile changes
@docs:
    pipx run --spec cogapp cog -r README.md

fmt recipe

$ just fmt
source
# format and overwrite justfile
@fmt:
    just --fmt --unstable

lint recipe

$ just lint
source
# check/lint our project
@lint:
    pipx run --spec cogapp cog --check README.md

server recipe

$ just server
source
# starts app
@server:
    echo "TODO: server"

setup recipe

$ just setup
source
# sets up a project to be used for the first time
@setup:
    echo "TODO: setup"

test recipe

$ just test
source
# runs tests
@test:
    echo "TODO: test"

update recipe

$ just update
source
# updates a project to run at its current version
@update:
    echo "TODO: update"

Resources

scripts-to-rule-them-all's People

Contributors

jefftriplett avatar simonw avatar

Stargazers

Fco. Javier Clavero Álvarez avatar Nikolaus Schlemm avatar  avatar Igor Kurochkin avatar Evgeny Pogrebnyak avatar Lacey Henschel avatar Trey Piepmeier avatar Sean Bleier avatar Linh Pham avatar  avatar  avatar Will Vincent avatar  avatar Alexander avatar Muhammad Hatta avatar Krzysztof Jeziorny avatar John Kurkowski avatar rusty kay avatar Christina Warren avatar Niel Thiart avatar Ferran Jovell avatar Artur Tamborski avatar Josh Boles avatar KimSia Sim avatar Nogweii avatar カシオ 金城 大関 avatar Jim Tinsky avatar  avatar Saravana avatar ptruser avatar Kenny Huynh avatar Tim Kendall avatar Edson Dias avatar Bruno Rocha avatar Daniel Andrlik avatar Kyle Mitchell avatar Rhet Turnbull avatar  avatar Ryan Cheley avatar Josh Thomas avatar Shreehari avatar Vladimir Tsoy avatar Dave Bauer avatar Brett Canter avatar Michael Bourke avatar Derrick Kearney avatar Tane Piper avatar Lamide Ogundeji avatar Chris Hasenpflug avatar Jimmy Briggs avatar

Watchers

 avatar James Cloos avatar  avatar  avatar

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.