gruntjs / grunt-contrib-pug

Compile Pug templates.
http://gruntjs.com/
MIT License
328 stars 77 forks source link

Warning/error with extends #154

Closed franciscop closed 8 years ago

franciscop commented 8 years ago

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.

shinnn commented 8 years ago

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.