Created
May 9, 2013 14:21
-
-
Save Daiz/5547737 to your computer and use it in GitHub Desktop.
Slakefile for a Lua project.
This file contains hidden or 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
require 'shelljs/global' | |
require! { | |
'gaze' | |
'charm' | |
} | |
charm = charm! | |
charm.pipe process.stdout | |
task 'build', 'Compile *.moon files to lib/*.lua', !-> | |
charm.write (exec 'moonc -t lib *.moon', silent: true).output | |
task 'test', 'Run unit tests with busted.', !-> | |
invoke \build | |
charm.write (exec 'busted', silent: true).output | |
task 'watch', 'Watch, compile and test files.', !-> | |
action = !-> | |
charm.reset! | |
invoke \test | |
action! | |
<-! gaze ['./*.moon','./spec/*_spec.moon'] | |
# throw errors | |
throw it if it? | |
@on \all , action |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment