Created
January 3, 2017 07:13
-
-
Save esperia/b11a9ee01725832194f45dee2546745b to your computer and use it in GitHub Desktop.
Auto-generate pdf for Lilypond.
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
var gulp = require('gulp'); | |
var path = require('path'); | |
var shell = require('gulp-shell') | |
gulp.task('default', ['watch']); | |
gulp.task('watch', function(){ | |
gulp.watch('./**/*.ly', ['build']); | |
}); | |
gulp.task('build', function () { | |
return gulp.src('*.ly', {read: false}) | |
.pipe(shell([ | |
'docker run -i --rm -v $(pwd):/work -w /work mikechernev/lilypond lilypond <%= f(file.path) %>', | |
], { | |
templateData: { | |
f: function (s) { | |
return path.basename(s); | |
//return s.replace(/$/, '.bak') | |
}, | |
} | |
})) | |
}) |
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
{ | |
"name": "lilypond", | |
"version": "0.1.0", | |
"description": "Auto-generate pdf for lilypond using the mikechernev/lilypond of DockerImage", | |
"scripts": { | |
"start": "gulp" | |
}, | |
"author": "neske", | |
"license": "MIT", | |
"devDependencies": { | |
"gulp": "^3.9.1", | |
"gulp-shell": "^0.5.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Usage