I am working on a project that is based on HTML5 Boilerplate. Unfortunately, grunt-cache-killer is not correctly replacing CSS files names in index.php; this is due to a file named style.css, this file is part of HTML5 Boilerplate.
<link rel="stylesheet" href="css/vendor/bootstrap-5.1.3.min.css">
<link rel="stylesheet" href="css/style.min.css">
<link rel="stylesheet" href="css/custom.min.css">
<link rel="style.20220813212624.min.css">
<link rel="style.20220813212624.min.css">
<link rel="style.20220813212624.min.css">
cacheKiller: {
options: {
mask: '{datetimestamp}',
prepend: '.'
},
build: {
files: {
'dist/css/style[mask].min.css' : ['dist/index.php'],
'dist/css/custom[mask].min.css' : ['dist/index.php']
}
}
},
[D] Options object: { prepend: '.', append: '', mask: '{datetimestamp}', length: -1 }
[D] Validating option types.
[D] Success..!
[D] Validating mask function type.
[D] Success..!
[D] Building tasks list.
[D] Working..!.
[D] Validating template filenames.
[D] Success..!
[D] Validating position of mask placeholder.
[D] Success..!
[D] Validating asset filename.
[D] Success..!
[D] Validating template filenames.
[D] Success..!
[D] Validating position of mask placeholder.
[D] Success..!
[D] Validating asset filename.
[D] Success..!
[D] Build tasks list.
[D] Success..!
[D] Tasks list object:
{
'0': {
asset: {
name: {
full: 'dist/css/style[mask].min.css',
base: 'dist/css/',
file: 'style[mask].min.css',
pre: 'style',
post: '.min.css'
},
mask: {
prepend: '.',
value: { raw: '20220813212624', computed: '20220813212624' },
append: ''
},
rename: {
from: { file: 'style.min.css', full: 'dist/css/style.min.css' },
to: {
file: 'style.20220813212624.min.css',
full: 'dist/css/style.20220813212624.min.css'
}
}
},
templates: [ 'dist/index.php' ]
},
'1': {
asset: {
name: {
full: 'dist/css/custom[mask].min.css',
base: 'dist/css/',
file: 'custom[mask].min.css',
pre: 'custom',
post: '.min.css'
},
mask: {
prepend: '.',
value: { raw: '20220813212624', computed: '20220813212624' },
append: ''
},
rename: {
from: { file: 'custom.min.css', full: 'dist/css/custom.min.css' },
to: {
file: 'custom.20220813212624.min.css',
full: 'dist/css/custom.20220813212624.min.css'
}
}
},
templates: [ 'dist/index.php' ]
}
}
[D] Synchronously renaming asset file.
[D] Success..!
>> build : Asset file 'style.min.css' renamed to 'style.20220813212624.min.css'.
[D]
[D] Synchronously read contents of template.
[D] Success..!
[D] Replace template's matching content.
[D] Success..!
[D] Synchronously write contents to template.
[D] Success..!
>> build : Reference(s) updated in template file 'dist/index.php'.
[D] Synchronously renaming asset file.
[D] Success..!
>> build : Asset file 'custom.min.css' renamed to 'custom.20220813212624.min.css'.
[D]
[D] Synchronously read contents of template.
[D] Success..!
[D] Replace template's matching content.
[D] Success..!
[D] Synchronously write contents to template.
[D] Success..!
>> build : Reference(s) updated in template file 'dist/index.php'.
Success..!
Done.