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

isolate media minification

This commit is contained in:
Matthias Kretschmann 2013-12-11 23:47:20 +01:00
parent f50a0ae69f
commit eda579fbe1
2 changed files with 27 additions and 15 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
node_modules
bower_components
_site
_build

View File

@ -5,6 +5,7 @@ module.exports = function(grunt){
var gruntConfig = {
src: '_src',
site: '_site',
build: '_build',
assets: {
less: 'assets/less',
css: 'assets/css',
@ -30,10 +31,14 @@ module.exports = function(grunt){
// clean everything
clean: {
build: [
site: [
'<%= config.site %>/*',
'<%= config.site %>/.htaccess',
'!<%= config.site %>/media'
],
build: [
'<%= config.build %>/*',
'<%= config.build %>/.htaccess'
]
},
@ -213,11 +218,19 @@ module.exports = function(grunt){
syncDestIgnoreExcl: true
}
},
// copy build
copy_build: {
options: {
src: '<%= config.site %>/',
dest: '<%= config.build %>',
syncDest: true
}
},
// deployment
deploy: {
options: {
syncDest: true,
src: '<%= config.site %>/',
src: '<%= config.build %>/',
dest: 'domains/kremalicious.com/html',
host: 'kremalicious',
ssh: true,
@ -235,7 +248,7 @@ module.exports = function(grunt){
grunt.loadNpmTasks(file);
});
// Default Task
// Default Task, assets only
grunt.registerTask('default', [
'less',
'cmq',
@ -247,6 +260,7 @@ module.exports = function(grunt){
// Full Dev server
grunt.registerTask('server', [
'clean:site',
'jekyll:development',
'rsync:copy_media',
'less',
@ -257,16 +271,6 @@ module.exports = function(grunt){
'watch'
]);
// Assets only Dev server
grunt.registerTask('server-assets', [
'less',
'cmq',
'cssmin',
'uglify',
'connect',
'watch'
]);
// Production build
grunt.registerTask('build', [
'clean',
@ -278,7 +282,14 @@ module.exports = function(grunt){
'uglify',
'rev',
'usemin',
'imagemin'
'imagemin:assets',
'imagemin:touchicons',
'rsync:copy_build'
]);
// Optimze media
grunt.registerTask('mediamin', [
'imagemin:media'
]);
// Deploy