Create a gist now

Instantly share code, notes, and snippets.

Auto-generate pdf for Lilypond.
var gulp = require('gulp');
var path = require('path');
var shell = require('gulp-shell')
gulp.task('default', ['watch']);
gulp.task('watch', function(){'./**/*.ly', ['build']);
gulp.task('build', function () {
return gulp.src('*.ly', {read: false})
'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')
"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"
esperia commented Jan 3, 2017 edited



# Provide docker image
docker pull mikechernev/lilypond

# Clone this files
git clone lilypond-builder
cd lilypond-builder

# install dependencies
npm install

# New files

# Start watch
npm start

# Edit files
# If you saved, start building automatically.
# If you created new file after `npm start` job, require restart this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment