grunt-usemin icon indicating copy to clipboard operation
grunt-usemin copied to clipboard

usemin not using revisioned file (filerev) in block

Open ZigaVukcevicDev opened this issue 9 years ago • 3 comments

Hi,

I am having an issue replacing minified css file with revisioned one. Note: my revisioned file is fully created in dist/public/css/styles-all.min.8e0e07d1.css

This is my grunt config file:

useminPrepare: {
    html: [
        'dist/resources/views/layouts/master.blade.php'
    ]
},
usemin: {
    html: [
        'dist/resources/views/layouts/master.blade.php'
    ],
    options: {
        assetsDirs: ['dist/public/css', 'dist']
    }
},

And this is my block in html file:

<!-- build:css {/- url /}/css/styles-all.min.css -->
<link href="<?php echo URL::to('/css/bootstrap.css'); ?>" rel="stylesheet" media="screen" />
<link href="<?php echo URL::to('/css/custom-styles.css'); ?>" rel="stylesheet" media="screen" />
<link href="<?php echo URL::to('/css/custom-spinner.css'); ?>" rel="stylesheet" media="screen" />
<link href="<?php echo URL::to('/css/datepicker.css'); ?>" rel="stylesheet" media="screen" />
<!-- endbuild -->

Where {/- url /} is variable used with grunt template, take it as http://someurl.com

My output is:

<link rel="stylesheet" href="http://someurl.com/css/styles-all.min.css" media="screen">

but it should be:

<link rel="stylesheet" href="http://someurl.com/css/styles-all.min.8e0e07d1.css" media="screen"> 

If I use

<!-- build:css styles-all.min.css -->

build goes okay but I am losing full URL then.

Any help please?

ZigaVukcevicDev avatar Aug 10 '15 12:08 ZigaVukcevicDev

Why do you need the full url. usually if you have a full url you are referencing some external file

eddiemonge avatar Aug 12 '15 19:08 eddiemonge

I can drop the full url but this is not working even with prefixed folder which I need to use

<!-- build:css css/styles-all.min.css -->

ZigaVukcevicDev avatar Aug 13 '15 11:08 ZigaVukcevicDev

I thought you said it was working in the last line of your original post

eddiemonge avatar Aug 13 '15 19:08 eddiemonge