Coder Social home page Coder Social logo

f1reflyyyylmao / guardian Goto Github PK

View Code? Open in Web Editor NEW

This project forked from f/guardian

0.0 1.0 0.0 838 KB

Guardian watches over your files and run assigned tasks.

Home Page: http://f.github.io/guardian

License: MIT License

Shell 1.19% Crystal 98.81%

guardian's Introduction

๐Ÿ’‚ Guardian.cr

Guardian watches over your files and runs assigned tasks.

Guardian

Installation

OS X

brew tap f/guardian
brew install guardian

Arch Linux

Guardian is availabe as a package from the Arch User Repository called guardian-git

From Source

git clone https://github.com/f/guardian.git && cd guardian
crystal build src/guardian.cr --release

Quickstart

Crystal Libs

Guardian works seamless with Crystal Projects. It automatically binds itself to library you use.

$ crystal init lib yourlib
$ cd yourlib
$ guardian --init
Created .guardian.yml of ./src/yourlib.cr

Non-Crystal Libs

You can use Guardian for other projects.

$ guardian --init
Created .guardian.yml

Usage

$ guardian --init

It will create a .guardian.yml file to use by Guardian.

.guardian.yml

.guardian.yml is a simple YAML file.

Simply it has YAML documents with seperated by --- line and each document has files and run keys.

files key needs a glob pattern, and run is a shell command what to run.

files: ./**/*.cr
run: crystal build ./src/guardian.cr
---
files: ./shard.yml
run: crystal deps

%file% Variable

Guardian replaces %file% variable in commands with the changed file.

files: ./**/*.txt
run: echo "%file% is changed"

Think you have a hello.txt in your directory, and Guardian will run echo "hello.txt is changed" command when it's changed.

Running Guardian

$ guardian
๐Ÿ’‚ Guardian is on duty!

Contributing

  1. Fork it ( https://github.com/f/guardian/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • f Fatih Kadir Akฤฑn - creator, maintainer

guardian's People

Contributors

cjgajard avatar diggersheep avatar elorest avatar f avatar f1reflyyyylmao avatar felixbuenemann avatar marceloboeira avatar mibamur avatar naltun avatar ysbaddaden avatar

Watchers

 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.