gruntjs - Grunt jade compiler filling out empty attributes -
i'm using grunt-contrib-jade module compile jade templates, if leave attribute blank following line:
article(ui-view)
it compile to:
<article ui-view="ui-view"></article>
and break angularjs ui-router, not handle "ui-view" directive if named view (not want). of course it's option write jade file this:
article(ui-view='')
but that's not want, there way stop jade compiler filling out empty attributes?
everything seems when there's doctype html
@ beginning of .jade
file.
for partials not have doctype
, can solved passing {doctype: 'html'}
option when calling jade:
jade -o "{doctype:'html'}" partial.jade
it works grunt-contrib-jade
adding doctype: 'html'
options, so:
jade: { devel: { options: { pretty: true, doctype: 'html' }, files: [{ expand: true, cwd: 'src', src: [ '**/*.jade' ], dest: 'app', ext: '.html' }] } }
Comments
Post a Comment