gruntjs / grunt-contrib-pug

Compile Pug templates.

Home Page:http://gruntjs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warning/error with extends

franciscop opened this issue · comments

I get the following warning:

Warning: Unexpected block "content" on line 3 of web/index.jade. This block is never used. This warning will be an error in v2.0.0

The file referenced is this:

extends layout

block content
  main
    header.hero
      div.content
        h1 ...

However, the compiled file is actually correct and does include layout.jade and the proper block content. I don't see this error with these files in a different express environment (and right now they are copied character per character).

This is the relevant part of the Gruntfile.js:

    jade: {
      compile: {
        options: {
          data: {
            debug: false
          }
        },
        files: {
          "indexJade.html": "web/index.jade"
        }
      }
    }

If I write "indexJade.html": ["web/layout.jade", "web/index.jade"] instead I get the exact same content, but duplicated, and the error persists.

Should be reported to https://github.com/pugjs/jade/issues instead.

I don't see this error with these files in a different express environment

Maybe it uses a different version of Jade as its dependency.