Giter Club home page Giter Club logo

active's Introduction

active

Active is an Erlang application that triggers rebuilds according to source changes. Active is also a new sync.

The key features are:

  • active no longer hogs disk and cpu to check for changes. Instead, it uses erlfsmon to observe filesystem events.
  • active uses rebar directly to build sources. This leverages rebar to build all kinds of source files that it can build including erlydtl templates.

An extremely simplified version of active can look like this (however it does not load any code):

# cat Makefile
sync:
	fsevent_watch -F . \
		| tee /dev/stderr \
		| env PERLIO=:raw perl -ne 's#.*\t.*\t$$ENV{"PWD"}/(apps|deps)/(\w+)/(?!ebin)#\2# && print "$$1=$$2\n"' \
		| xargs -n1 rebar compile

Setting up

Just add a line to rebar.config:

    {active, ".*", {git, "[email protected]:proger/active", "HEAD"}}

And make sure you start it along in your release boot scripts or application startup scripts:

ERL_LIBS=deps erl -pa ebin -config sys.config \
    -eval '[ok = application:ensure_started(A, permanent) || A <- [sasl,lager,gproc,erlfsmon,compiler,crypto,syntax_tools,tools,rebar,active]]'

Caveats

  • rebar depends on sasl. If you don't wish to see large SASL logs (e.g. you use lager), turn them off in your config:
    {sasl, [{sasl_error_logger, false}]}

active's People

Contributors

proger 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.