Skip to content

Instantly share code, notes, and snippets.

@loganhenson
Created September 20, 2016 21:38
Show Gist options
  • Save loganhenson/5594e1a6259e830aa42479550b130e3e to your computer and use it in GitHub Desktop.
Save loganhenson/5594e1a6259e830aa42479550b130e3e to your computer and use it in GitHub Desktop.
Laravel Elixir Elm Extension
// for use with php elm gist: https://gist.github.com/loganhenson/90bb7d0c5207c4b549561ba6f30045a3
elixir.extend('elm', function(dir) {
var elmPath = elixir.config.assetsPath + '/elm/' + dir;
return new elixir.Task('elm', function() {
var command = 'elm make main.elm --output ../../../../' + elixir.config.publicPath + '/js/' + dir + '.js';
return gulp.src('').pipe(shell('cd ' + elmPath + ';' + command));
}).watch(elmPath + '/main.elm');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment