Coder Social home page Coder Social logo

edt's Introduction

Introduction

An OTP application to auto compile changed files into an erlang node.

Dependencies

edt uses fs to be notified on files changes and requires a platform specific fs backend to be installed which can be installed like

Mac

brew install fswatch

Linux

<install> inotify-tools

How to use

Add the following line to the rebar3 profile of your choice

 {edt, "", {git, "https://github.com/raghavkarol/edt.git", {branch, "master"}}}

Then start and erlang node like

(REBAR3_PROFILE=<profile> ; rebar3 as <profile> shell --apps edt)

Now editing and changing a file will automatically reload

Post actions

Post actions are executed on successful compile and reload of a module. For example to run tests eunit tests in a module do:

 1> edt_post_action:add(
    _Name = test_1, _
    Action = fun() ->
      edt_api:test(module_with_eunit_tests)
    end).

 2> edt_post_action:add(
     _Name = test_2,
     _Action = fun() ->
       edt_api:test(ct_SUITE)
     end).

There can be multiple post actions are are executed in the Name order.

Emacs flycheck backend

To use as a flymake backend we can extend flycheck-rebar3 available on ELPA with the following configuration.

(flycheck-define-checker erlang-edt-flycheck
    "An Erlang syntax checker using the edt  server."
    :command ("~/bin/flycheck_edt" (eval (buffer-file-name)))
    :error-parser flycheck-parse-with-patterns-without-color
    :error-patterns
    ((warning line-start
              (file-name) ":" line ": Warning:" (message) line-end)
     (error line-start
            (file-name) ":" line ": " (message) line-end))
    :modes erlang-mode
    :enabled flycheck-rebar3-project-root
    :predicate flycheck-buffer-saved-p
    :working-directory flycheck-rebar3-project-root)

  (add-to-list 'flycheck-checkers 'erlang-edt-flycheck)

See flycheck_edt

EDT Profile

What is edt_profile, examples of how to use it.

Supported environment variables

EDT_PROFILE_TRACK_CALLS=true
EDT_PROFILE_MAX_CALLS=1000
EDT_PROFILE_CAPTURE=true

edt's People

Contributors

raghavkarol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

lehoff

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.