Last active
August 29, 2015 14:25
-
-
Save abaez/cbf9880b95207bb5ba16 to your computer and use it in GitHub Desktop.
Small snippet with macro for tup using Moonscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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