mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Use a similar loop for the minification step for CSS
This commit is contained in:
parent
4c8bf9ae19
commit
daf5a80081
|
@ -79,6 +79,21 @@ for (var i in skins) {
|
|||
)
|
||||
}
|
||||
|
||||
var css_skins = fs.readdirSync("public/css/dist/skins");
|
||||
for (var i in css_skins) {
|
||||
if (css_skins[i].endsWith(".min.css")) {
|
||||
//don't minify already minified skinns
|
||||
continue;
|
||||
}
|
||||
if (css_skins[i].endsWith(".css")) {
|
||||
// only minify files ending with '.css'
|
||||
mix.minify("public/css/dist/skins/" + css_skins[i]).version();
|
||||
}
|
||||
//TODO - if we only ever use the minified versions, this could be simplified down to one line (above)
|
||||
// but it stays like this so we have the minified and non-minified versions of the skins
|
||||
// right now the code seems to use the un-minified skins
|
||||
}
|
||||
|
||||
/**
|
||||
* Combine bootstrap table css
|
||||
*/
|
||||
|
@ -150,26 +165,3 @@ mix
|
|||
"./public/js/dist/all.js"
|
||||
)
|
||||
.version();
|
||||
|
||||
/**
|
||||
* Copy, minify and version skins
|
||||
*/
|
||||
mix
|
||||
.minify([
|
||||
"./public/css/dist/skins/skin-green.css",
|
||||
"./public/css/dist/skins/skin-green-dark.css",
|
||||
"./public/css/dist/skins/skin-black.css",
|
||||
"./public/css/dist/skins/skin-black-dark.css",
|
||||
"./public/css/dist/skins/skin-blue.css",
|
||||
"./public/css/dist/skins/skin-blue-dark.css",
|
||||
"./public/css/dist/skins/skin-yellow.css",
|
||||
"./public/css/dist/skins/skin-yellow-dark.css",
|
||||
"./public/css/dist/skins/skin-red.css",
|
||||
"./public/css/dist/skins/skin-red-dark.css",
|
||||
"./public/css/dist/skins/skin-purple.css",
|
||||
"./public/css/dist/skins/skin-purple-dark.css",
|
||||
"./public/css/dist/skins/skin-orange.css",
|
||||
"./public/css/dist/skins/skin-orange-dark.css",
|
||||
"./public/css/dist/skins/skin-contrast.css",
|
||||
])
|
||||
.version();
|
||||
|
|
Loading…
Reference in a new issue