Merge pull request #133 from schursin/issue-67

schema syntax errors reporting in development mode
This commit is contained in:
Kam Low 2018-03-23 15:34:35 +01:00 committed by GitHub
commit 6b03e34b3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,9 +119,12 @@ module.exports = function (options) {
grunt.registerTask('develop', ['server', 'watch'])
// Reload template data when watch files change
grunt.event.on('watch', function(action, filepath) {
// if (filepath == config.specFile)
grunt.config.set('compile-handlebars.compile.templateData', loadData())
grunt.event.on('watch', function() {
try {
grunt.config.set('compile-handlebars.compile.templateData', loadData())
} catch (e) {
grunt.fatal(e);
}
})
// Report, etc when all tasks have completed.