1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-22 18:00:06 +01:00

CDN all assets called from css files with grunt-cdn

This commit is contained in:
Matthias Kretschmann 2014-09-06 15:30:15 +02:00
parent 3271fd851a
commit ae74b86bdb
2 changed files with 17 additions and 2 deletions

View File

@ -205,6 +205,19 @@ module.exports = function(grunt){
assetsDirs: ['<%= config.build %>', '<%= config.build %>/assets/{css,js,img,fonts}'] assetsDirs: ['<%= config.build %>', '<%= config.build %>/assets/{css,js,img,fonts}']
} }
}, },
// CDN some assets
cdn: {
options: {
cdn: 'https://d2jlreog722xe2.cloudfront.net/assets/',
flatten: true
},
dist: {
src: [
'<%= config.build %>/assets/**/*.css' // CDN all assets called from css files
]
}
},
// rsync stuff around // rsync stuff around
rsync: { rsync: {
@ -288,7 +301,8 @@ module.exports = function(grunt){
'imagemin:touchicons', 'imagemin:touchicons',
'rsync:copy_build', 'rsync:copy_build',
'rev', 'rev',
'usemin' 'usemin',
'cdn'
]); ]);
// Optimze media // Optimze media

View File

@ -23,7 +23,8 @@
"grunt-jekyll": ">=0.4.0", "grunt-jekyll": ">=0.4.0",
"grunt-rsync": ">=0.2.1", "grunt-rsync": ">=0.2.1",
"grunt-rev": ">=0.1.0", "grunt-rev": ">=0.1.0",
"grunt-usemin": ">=2.0.2" "grunt-usemin": ">=2.0.2",
"grunt-cdn": ">=0.5.6"
}, },
"engines": { "engines": {
"node": ">=0.10.29" "node": ">=0.10.29"