minified bower files
This commit is contained in:
parent
63275dbe6a
commit
e4db1eb2f1
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
<!-- Fav Icon -->
|
<!-- Fav Icon -->
|
||||||
<link href="/modules/core/img/brand/favicon.ico" rel="shortcut icon" type="image/x-icon">
|
<link href="/modules/core/img/brand/favicon.ico" rel="shortcut icon" type="image/x-icon">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css">
|
||||||
<link rel="stylesheet" href="/lib/bootstrap/dist/css/bootstrap.min.css">
|
<link rel="stylesheet" href="/lib/bootstrap/dist/css/bootstrap.min.css">
|
||||||
<!--Bower CSS dependencies-->
|
<!--Bower CSS dependencies-->
|
||||||
{% for bowerCssFile in bowerCssFiles %}
|
{% for bowerCssFile in bowerCssFiles %}
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
"angular-ui-utils": "~3.0.0",
|
"angular-ui-utils": "~3.0.0",
|
||||||
"angular-ui-router": "~0.2.11",
|
"angular-ui-router": "~0.2.11",
|
||||||
"angular-strap": "~2.3.1",
|
"angular-strap": "~2.3.1",
|
||||||
"restangular": "~1.5.1",
|
|
||||||
"ng-file-upload": "~10.0.2",
|
"ng-file-upload": "~10.0.2",
|
||||||
"angular-raven": "~0.5.11",
|
"angular-raven": "~0.5.11",
|
||||||
"angular-ui-date": "~0.0.8",
|
"angular-ui-date": "~0.0.8",
|
||||||
|
@ -28,7 +27,6 @@
|
||||||
"angular-input-stars": "*",
|
"angular-input-stars": "*",
|
||||||
"file-saver.js": "~1.20150507.2",
|
"file-saver.js": "~1.20150507.2",
|
||||||
"angular-bootstrap-colorpicker": "~3.0.19",
|
"angular-bootstrap-colorpicker": "~3.0.19",
|
||||||
"components-font-awesome": "~4.4.0",
|
|
||||||
"angular-ui-router-tabs": "~1.7.0",
|
"angular-ui-router-tabs": "~1.7.0",
|
||||||
"angular-scroll": "^1.0.0",
|
"angular-scroll": "^1.0.0",
|
||||||
"ui-select": "angular-ui-select#^0.16.1",
|
"ui-select": "angular-ui-select#^0.16.1",
|
||||||
|
@ -39,5 +37,10 @@
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"angular-bootstrap": "^0.14.0",
|
"angular-bootstrap": "^0.14.0",
|
||||||
"angular": "1.4.x"
|
"angular": "1.4.x"
|
||||||
}
|
},
|
||||||
|
"overrides": {
|
||||||
|
"BOWER-PACKAGE": {
|
||||||
|
"main": "**/*.min.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,14 @@ var _ = require('lodash'),
|
||||||
path = require('path'),
|
path = require('path'),
|
||||||
fs = require('fs');
|
fs = require('fs');
|
||||||
|
|
||||||
|
var exists = require('path-exists').sync;
|
||||||
|
|
||||||
|
var minBowerFiles = function(type){
|
||||||
|
return bowerFiles(type).map( function(path, index, arr) {
|
||||||
|
var newPath = path.replace(/.([^.]+)$/g, '.min.$1');
|
||||||
|
return exists( newPath ) ? newPath : path;
|
||||||
|
});
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Load app configurations
|
* Load app configurations
|
||||||
*/
|
*/
|
||||||
|
@ -74,13 +82,13 @@ module.exports.removeRootDir = function(files, root) {
|
||||||
* Get the app's bower dependencies
|
* Get the app's bower dependencies
|
||||||
*/
|
*/
|
||||||
module.exports.getBowerJSAssets = function() {
|
module.exports.getBowerJSAssets = function() {
|
||||||
return this.removeRootDir(bowerFiles('**/**.js'), 'public/');
|
return this.removeRootDir(minBowerFiles('**/**.js'), 'public/');
|
||||||
};
|
};
|
||||||
module.exports.getBowerCSSAssets = function() {
|
module.exports.getBowerCSSAssets = function() {
|
||||||
return this.removeRootDir(bowerFiles('**/**.css'), 'public/');
|
return this.removeRootDir(minBowerFiles('**/**.css'), 'public/');
|
||||||
};
|
};
|
||||||
module.exports.getBowerOtherAssets = function() {
|
module.exports.getBowerOtherAssets = function() {
|
||||||
return this.removeRootDir(bowerFiles('**/!(*.js|*.css|*.less)'), 'public/');
|
return this.removeRootDir(minBowerFiles('**/!(*.js|*.css|*.less)'), 'public/');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue