Skip to content

Instantly share code, notes, and snippets.

@Daiz
Created May 9, 2013 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Daiz/5547737 to your computer and use it in GitHub Desktop.
Save Daiz/5547737 to your computer and use it in GitHub Desktop.
Slakefile for a Lua project.
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