GithubHelp home page GithubHelp logo

rajatvaryani / 1build Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gopinath-langote/1build

0.0 2.0 0.0 341 KB

Frictionless way of managing project-specific commands

Home Page: https://1build.gitbook.io

License: MIT License

Go 100.00%

1build's Introduction


1build Version License Build Status Go Report Card Join the chat on Slack


1build is an automation tool that arms you with the convenience to configure project-local command line aliases – and then run the commands quickly and easily. It is particularly helpful when you deal with multiple projects and switch between them all the time. It is often the fact that different projects use different build tools and have different environment requirements – and then switching from one project to another is becoming increasingly cumbersome. That is where 1build comes into play.

With 1build you can create simple and easily memorable command aliases for commonly used project commands such as build, test, run or anything else. These aliases will have a project-local scope which means that they will be accessible only within the project directory. This way you can unify all your projects to build with the same simple command disregarding of what build tool they use. It will remove the hassle of remembering all those commands improving the mental focus for the things that actually matter.

Install

  1. Download and unzip latest release v1.2.0 for your OS.
  2. Move the 1build executable to your $PATH.

Usage

Configuration

  • Create 1build.yaml configuration file by
    1build init --name <your_project_name>
  • Edit file according to project command list, Example of 1build.yaml for node project:
    project: Sample JVM Project Name
    commands:
      - build: npm run build
      - test: npm run test

Running 1build for the above sample project:

  • building the project

    1build build
  • fix the coding guidelines lint and run tests (executing more than one commands at once)

    1build lint test

Set new or update existing configuration

  • Set new command configuration for lint to "eslint server.js"
    1build set lint "eslint server.js"

Remove/Unset existing configuration

  • Unset command configuration for lint
    1build unset lint

Using before and after commands

Consider that your project requires some environment variables to set before running any commands and you want to clean up those after running commands. It is a headache to always remember to set those environment variables. What you want is to set env variables automatically when you run the command in the project and remove those when the command is complete. Another example – a project requires Docker to be up and running or you need to clean up the database after running a test harness.

This is where before & after commands are useful. These commands are both optional –  you can use one of them, both or neither.

Examples:

  1. Setting env variables and cleaning those up

    project: Sample JVM Project Name
    before: export VARNAME="my value"
    after: unset VARNAME
    commands:
      - build: npm run build
  2. Ensure that Docker is up and running

    project: Containerized Project
    before: ./docker_run.sh
    commands:
      - build: npm run build
  3. Clean up database after some commands

    project: Containerized Project
    after: ./clean_database.sh
    commands:
     - build: npm run build

See 1build --help for command usages.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use Semantic Versioning for all our releases. For the versions available, see the tags on this repository.

Changelog

All notable changes to this project in each release will be documented in CHANGELOG.md.

The format is based on Keep a Changelog.

License

This project is licensed under the MIT License - see the LICENSE file for details

Authors

See also the list of contributors who participated in this project.

Sponsors

1build 1build

1build's People

Contributors

alexluix avatar dependabot-preview[bot] avatar gopinath-langote avatar maniish-jaiin avatar pyup-bot avatar themayurkumbhar avatar

Watchers

 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.