ladjs / gulp-jade-usemin

Gulp plugin for running usemin on Jade files
MIT License
21 stars 15 forks source link

css build <link> isn't inserted into jade file #25

Open jakobdamjensen opened 8 years ago

jakobdamjensen commented 8 years ago

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")
jakobdamjensen commented 8 years ago

it's working in 1.0.5

niftylettuce commented 8 years ago

@jakobdamjensen can you submit a PR to patch the regexp here? https://github.com/niftylettuce/gulp-jade-usemin/blob/master/index.js#L19-L26

niftylettuce commented 8 years ago

reason it was changed: https://github.com/niftylettuce/gulp-jade-usemin#110