Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

usemin not using revisioned file (filerev) in block #583

Open
ZigaVukcevicDev opened this issue Aug 10, 2015 · 3 comments
Open

usemin not using revisioned file (filerev) in block #583

ZigaVukcevicDev opened this issue Aug 10, 2015 · 3 comments

Comments

@ZigaVukcevicDev
Copy link

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?

@eddiemonge
Copy link
Member

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

@ZigaVukcevicDev
Copy link
Author

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 -->

@eddiemonge
Copy link
Member

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants