Closed jagzviruz closed 8 years ago
I have a .pug file like below
img(src="#{cdnImg}/name.svg") img(src="#{cdn}/name.svg")
and a gruntfile like below.
module.exports = function(grunt) { grunt.initConfig({ pug: { dev: { options: { data: { cdn: "/img", cdnImg: "/images" } }, files: { 'test.html': 'test.pug' } } } }); }; grunt.loadNpmTasks('grunt-contrib-pug'); grunt.registerTask('default', ['pug:dev']);
When I execute the default task, I get a html generated as below <img src="#{cdnImg}/name.svg"/><img src="#{cdn}/name.svg"/>
<img src="#{cdnImg}/name.svg"/><img src="#{cdn}/name.svg"/>
As you see the variables did not get replaced. Is this a bug, or am I doing something wrong ?
This is not an issue with this plugin, but with Pug. https://github.com/pugjs/pug/issues
I have a .pug file like below
and a gruntfile like below.
When I execute the default task, I get a html generated as below
<img src="#{cdnImg}/name.svg"/><img src="#{cdn}/name.svg"/>
As you see the variables did not get replaced. Is this a bug, or am I doing something wrong ?