gulp-jade-usemin icon indicating copy to clipboard operation
gulp-jade-usemin copied to clipboard

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

Open jakobdamjensen opened this issue 9 years ago • 3 comments

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 avatar Dec 01 '15 14:12 jakobdamjensen

it's working in 1.0.5

jakobdamjensen avatar Dec 01 '15 17:12 jakobdamjensen

@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 avatar Dec 01 '15 18:12 niftylettuce

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

niftylettuce avatar Dec 01 '15 18:12 niftylettuce