Skip to content

Instantly share code, notes, and snippets.

@abaez
Last active August 29, 2015 14:25
Show Gist options
  • Save abaez/cbf9880b95207bb5ba16 to your computer and use it in GitHub Desktop.
Save abaez/cbf9880b95207bb5ba16 to your computer and use it in GitHub Desktop.
Small snippet with macro for tup using Moonscript
--- Compiles any moon into lua.
-- @author [Alejandro Baez](https://twitter.com/a_baez)
-- @license [MIT](http://opensource.org/licenses/MIT)
-- @module Tupfile
--- a macro for moon compilation.
moon = (input) -> tup.frule {
inputs: {input},
command: "moonc %f",
outputs: {"%B.lua"}
}
for _,res in ipairs tup.glob "*.moon" do
moon res unless res\match "Tupfile"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment