Skip to content

Instantly share code, notes, and snippets.

@vendethiel
Forked from Daiz/lua-slakefile.ls
Last active December 17, 2015 04:08
Show Gist options
  • Select an option

  • Save vendethiel/5548012 to your computer and use it in GitHub Desktop.

Select an option

Save vendethiel/5548012 to your computer and use it in GitHub Desktop.
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}).output
task 'test' 'Run unit tests with busted.', !->
invoke \build
charm.write (exec 'busted', {+silent}).output
task 'watch', 'Watch, compile and test files.', !->
do action = !->
charm.reset!
invoke \test
<-! 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