gulp-jade-usemin
gulp-jade-usemin copied to clipboard
css build <link> isn't inserted into jade file
Got this build in my jade file:
doctype html
html
head
link(href='//fonts.googleapis.com/css?family=Open+Sans:400,300,700,600' rel='stylesheet' type='text/css')
//- build:css /public/css/app/app.css
link(rel='stylesheet', href='/public/app/main.css')
//- endbuild
meta(name="google" content="notranslate")
meta(name="viewport" content="width=device-width, initial-scale=1, user-scalable=no")
And the file this gulp task:
gulp.task('usemin', function() {
gulp.src('./server/views/app/*.jade')
.pipe(usemin({
css: [uglifycss(), rev()],
js: [uglify(), rev()],
assetsDir: 'server'
}))
.pipe(gulp.dest('server/views/dist'));
});
The uglified css file is generated just fine and it's given a revisioned file name and stored at the correct location. But the tag disappears from the jade output file. Anybody know what's going on? I've got the latest version. And it's working just fine with javascript build.
output:
doctype html
html
head
link(href='//fonts.googleapis.com/css?family=Open+Sans:400,300,700,600' rel='stylesheet' type='text/css')
meta(name="google" content="notranslate")
meta(name="viewport" content="width=device-width, initial-scale=1, user-scalable=no")
it's working in 1.0.5
@jakobdamjensen can you submit a PR to patch the regexp here? https://github.com/niftylettuce/gulp-jade-usemin/blob/master/index.js#L19-L26
reason it was changed: https://github.com/niftylettuce/gulp-jade-usemin#110