Skip to content

Instantly share code, notes, and snippets.

@wetmore
Created October 10, 2014 15:26
Show Gist options
  • Save wetmore/0ed545c37f1c0fe3bd29 to your computer and use it in GitHub Desktop.
Save wetmore/0ed545c37f1c0fe3bd29 to your computer and use it in GitHub Desktop.
assignment = __dirname.substr(__dirname.lastIndexOf('/') + 1)
module.exports = (grunt) ->
grunt.initConfig
watch:
files: ['!full.tex', '*.tex']
tasks: 'exec:pdf'
options:
event: ['changed']
exec:
pdf:
command: 'pdf; open ' + assignment + '.pdf'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-exec'
grunt.registerTask 'default', ['watch']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment