rotor alternatives and similar packages
Based on the "Build Tools" category.
Alternatively, view rotor alternatives based on common mentions on social networks and blogs.
Rebar39.9 5.4 rotor VS Rebar3Erlang build tool that makes it easy to compile and test Erlang applications and releases.
relx9.5 2.2 rotor VS relxSane, simple release creation for Erlang
reaxt8.4 0.0 rotor VS reaxtUse React template into your Elixir application for server rendering
mad7.9 0.0 rotor VS mad⚡ MAD: Managing Application Dependencies LING/UNIX
remix7.3 0.0 rotor VS remixAutomatic recompilation of mix code on file change.
pc6.8 0.0 rotor VS pcA rebar3 port compiler
active6.1 2.4 rotor VS active♾️ ACTIVE: Filesystem Activities
rebar3_auto5.4 0.0 rotor VS rebar3_autoRebar3 plugin to auto compile and reload on file change.
rebar3_run4.8 0.0 rotor VS rebar3_runRun a release with one simple command
rebar3_eqc4.7 0.0 rotor VS rebar3_eqcA rebar3 plugin to enable the execution of Erlang QuickCheck properties
reltool_util4.1 0.0 rotor VS reltool_utilErlang reltool utility functionality application
coffee_rotor3.3 0.0 rotor VS coffee_rotorRotor plugin to compile CoffeeScript files
ExMake3.2 0.0 rotor VS ExMakeA modern, scriptable, dependency-based build tool loosely based on Make principles.
rebar3_diameter_compilerCompile Diameter .dia files on Erlang Rebar3 projects
rebar3_exunit3.1 0.0 rotor VS rebar3_exunitA plugin to run Elixir ExUnit tests from rebar3 build tool
etude3.1 0.0 rotor VS etudefutures for elixir/erlang
rebar3_neotoma_plugin3.1 0.0 rotor VS rebar3_neotoma_pluginRebar3 neotoma (Parser Expression Grammar) compiler
rebar3_protobuffs2.6 0.0 rotor VS rebar3_protobuffsrebar3 protobuffs provider using protobuffs from Basho
rebar3_asn1_compiler1.5 0.0 rotor VS rebar3_asn1_compilerPlugin for compiling ASN.1 modules with Rebar3.
Exscript1.3 0.0 rotor VS ExscriptElixir escript library (derived work from elixir)
rebar3_live1.1 0.0 rotor VS rebar3_liveRebar3 live plugin
dismake1.0 0.0 rotor VS dismakea "compiler" (as in `Mix.compilers`) for Elixir that just runs make
rebar3_idl_compiler0.8 0.0 rotor VS rebar3_idl_compilerThis is a plugin for compiling Erlang IDL files using Rebar3.
sass_elixir0.6 0.0 rotor VS sass_elixirA sass plugin for elixir projects
rebar3_abnfc_plugin0.5 0.0 rotor VS rebar3_abnfc_pluginRebar3 abnfc plugin
rebar3_yang_plugin0.2 0.0 rotor VS rebar3_yang_pluginRebar3 yang compiler
Access the most powerful time series database as a service
Do you think we are missing an alternative of rotor or a related project?
Rotor is a build system for Elixir projects. Use it to compile things, run commands or do anything that needs to be run when files change.
Wreckers don't call for backup, they call for cleanup ~!
Define your rotor watch groups in
config/rotors.exs in your project and they'll be loaded when your app starts
- Works with any web framework or even plain mix projects
- Easy to use
- Extendable with simple functions
- Can be configured to run commands or code or go to the moon.
- Add rotor as a dependency to your
- Define watch groups in
IExconsole to run the rotors
Example 1: Reload Elixir modules whenever they change
# config/rotors.exs use Rotor.Config paths = ["lib/**/*"] Rotor.define :ex_modules, paths, fn(changed, _all)-> reload_modules(changed) end
Make changes to any file in the lib dir of your project and watch it reload in your console
Example 2: Compile CoffeeScript files whenever they change
# config/rotors.exs use Rotor.Config paths = ["assets/libs/*.coffee", "assets/*.coffee"] Rotor.define :coffee_assets, paths, fn(changed_files, all_files)-> read_files(all_files) |> coffee |> concat |> write_to("priv/static/assets/app.js") end
touch a file that's in the path provided and watch the rotor function being run.
The above example uses the coffee_rotor.
NOTE: Rotor is not a replacement for mix. It is intended to be used as your sidekick during development.
What is a watch group?
A set of paths you want to watch is called a Watch group". Each watch group has the following:
- a list of paths to watch
- rotor function - a function that is run everytime any of the files in the paths changes. It should accept 2 arguments
- changed_files - a list of maps, each containing info about a changed file
- all_files - a list of maps, each containing info about all files that matched the path
Where to define watch groups?
config/rotors.exs is prefered. But if you want to define them elsewhere feel free. Take a look at examples
How to run them?
Rotor.start in your
IEx console to run the rotors.
You can also automate this by adding
Rotor.start somewhere in your code. But be careful ~!
How to define watch groups?
# With default options Rotor.define(name, files, rotor_function) # With options Rotor.define(name, files, rotor_function, options)
The rotor function is passed info about the list of files that match the paths specified. The rotor function calls other little functions called
rotors, that run certain tasks.
The fourth argument is options. It accepts a map. The following are valid options:
manual- defaults to false. If set to true, paths will only be polled when
interval- defaults to 2500 milliseconds (2.5 seconds). This is the interval at which files are checked for changes.
Manually running watch group's rotor function
If you want files to be polled only when you say so (and not at intervals). Then pass the
manual option as
true when adding a group. Then use one of the following functions to trigger a poll.
Rotor.run(group_name)- will poll paths and run the Rotor function synchronously
Rotor.run_async(group_name)- will poll paths and run the Rotor function asynchronously
Rotor ships with a few simple helper functions in the
read_files(files)- reads contents of files, and returns files with a property called
copy_files(files, destination_dir)- copies files to destination_dir
concat(files)- concats contents of files and returns a string
write_to(contents, output_path)- writes the contents to the file path specified in output path
reload_modules(files)- reloads the modules in the list of files passed
You can also write your own. Check the "Writing custom rotors" section below.
- To remove a watch group
- To list all watch groups
- To run a watch group's rotor function forcefully
paths = ["assets/stylesheets/libs/*.css", "assets/stylesheets/*.css"] Rotor.define :stylesheets, paths, fn(changed_files, all_files)-> read_files(all_files) |> concat |> write_to("app.css") end paths = ["assets/images/*", "assets/fonts/*"] Rotor.define :images_and_fonts, paths, fn(changed_files, all_files)-> copy_files(files, "priv/static/assets") end
Writing custom rotors
Rotors are just functions that accept data and do something.
Checkout coffee_rotor, which provides a rotor to compile CoffeeScript files.
Copyright © 2014, Akash Manohar J, under the MIT License
Inspired by gulp
*Note that all licence references and agreements mentioned in the rotor README section above are relevant to that project's source code only.