-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Live reload causes blueprint to not render correctly #239
Comments
What is your setup? I have a working gulp task, setup somewhat like this: 'use strict';
var gulp = require('gulp');
var aglio = require('aglio');
var browserSync = require('browser-sync');
var config = require('../config');
var logger = require('../../lib/logger');
gulp.task('docs', function() {
var options = {
themeVariables: 'slate',
themeTemplate: 'triple',
};
aglio.renderFile(config.input, config.output, options, function(err, html, warnings) {
if (err) {
return logger.error('Error while rendering blueprint:', err);
}
if (warnings) {
logger.warn('Warning while rendering blueprint:', warnings);
}
if (browserSync.active) {
browserSync.reload();
}
});
});
gulp.task('watch', ['browserSync', 'server'], function() {
gulp.watch(config.input, ['docs']);
}); |
I just run it like so |
I am currently experiencing the same issue as @kennydude on ArchLinux with aglio 2.3.0 After digging for a while, I realized that the length of the blueprint document being read was often 0, so I suspected there was a race condition happening while the file was being read. I will post a pull request shortly. |
When using Live-reload aglio will sometimes render an entirely blank version of my blueprint. The only way to fix this is to stop and restart the command and it works correctly.
This is using aglio 2.2 and nodejs 2.5.0
The text was updated successfully, but these errors were encountered: