L
L
lavezzi12015-09-29 17:57:19
css
lavezzi1, 2015-09-29 17:57:19

Is this inheritance practice bad (jade)?

Hello colleagues.
Now I have the following in my project:
There is a partial:
top-navigation.jade
Another partial
sidebar.jade
is included inside it And top-navigation.jade itself is included in layot.jade, and I add the layout to the pages through extands.
I'm asking this question because I'm having trouble compiling to gulp. Already installed and configured gulp-jade-inheritance. But still gulp refuses to compile the last partial - sidebar.jade. Can it is necessary to refuse such "deep" inheritance, or it is normal practice?
Task

gulp.task('jade', function() {
  gulp.src(path.source.html)
    .pipe(changed('public/', {extension: '.html'}))
    .pipe(jadeInheritance(plugins.jadeInheritance.options))
    .pipe(jade(plugins.jade.options))
    .on('error', handleError)
    .pipe(gulp.dest(path.dest.html))
    .pipe(reload({stream:true}));
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Gatilin, 2015-10-10
@gatilin222

I would recommend using jade mixins for partials. At least it's convenient + you can pass the parameters. You can see my standard template for a quick site layout.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question