mirror of
https://github.com/kremalicious/blog.git
synced 2025-02-14 21:10:25 +01:00
fix picturefill path
This commit is contained in:
parent
774c0302b8
commit
b93174baaa
54
Gruntfile.js
54
Gruntfile.js
@ -1,6 +1,6 @@
|
|||||||
module.exports = function(grunt){
|
module.exports = function(grunt){
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// config
|
// config
|
||||||
var gruntConfig = {
|
var gruntConfig = {
|
||||||
src: '_src',
|
src: '_src',
|
||||||
@ -14,7 +14,7 @@ module.exports = function(grunt){
|
|||||||
fonts: 'assets/fonts'
|
fonts: 'assets/fonts'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// banner
|
// banner
|
||||||
grunt.log.writeln("");
|
grunt.log.writeln("");
|
||||||
grunt.log.writeln(" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
|
grunt.log.writeln(" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
|
||||||
@ -23,21 +23,21 @@ module.exports = function(grunt){
|
|||||||
grunt.log.writeln("");
|
grunt.log.writeln("");
|
||||||
grunt.log.writeln(" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
|
grunt.log.writeln(" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
|
||||||
grunt.log.writeln("");
|
grunt.log.writeln("");
|
||||||
|
|
||||||
// Grunt config
|
// Grunt config
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
pkg: grunt.file.readJSON('package.json'),
|
pkg: grunt.file.readJSON('package.json'),
|
||||||
config: gruntConfig,
|
config: gruntConfig,
|
||||||
|
|
||||||
// clean everything
|
// clean everything
|
||||||
clean: {
|
clean: {
|
||||||
site: [
|
site: [
|
||||||
'<%= config.site %>/*',
|
'<%= config.site %>/*',
|
||||||
'<%= config.site %>/.htaccess',
|
'<%= config.site %>/.htaccess',
|
||||||
'!<%= config.site %>/media'
|
'!<%= config.site %>/media'
|
||||||
],
|
],
|
||||||
build: [
|
build: [
|
||||||
'<%= config.build %>/*',
|
'<%= config.build %>/*',
|
||||||
'<%= config.build %>/.htaccess'
|
'<%= config.build %>/.htaccess'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -57,11 +57,11 @@ module.exports = function(grunt){
|
|||||||
options: {
|
options: {
|
||||||
drafts: true,
|
drafts: true,
|
||||||
future: true,
|
future: true,
|
||||||
limit_posts: 5
|
//limit_posts: 5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// less
|
// less
|
||||||
less: {
|
less: {
|
||||||
production: {
|
production: {
|
||||||
@ -71,7 +71,7 @@ module.exports = function(grunt){
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
// combine css media queries
|
// combine css media queries
|
||||||
cmq: {
|
cmq: {
|
||||||
production: {
|
production: {
|
||||||
@ -80,7 +80,7 @@ module.exports = function(grunt){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// minify css
|
// minify css
|
||||||
cssmin: {
|
cssmin: {
|
||||||
production: {
|
production: {
|
||||||
@ -90,7 +90,7 @@ module.exports = function(grunt){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Concatenate and minify js
|
// Concatenate and minify js
|
||||||
uglify: {
|
uglify: {
|
||||||
options: {
|
options: {
|
||||||
@ -104,7 +104,7 @@ module.exports = function(grunt){
|
|||||||
production: {
|
production: {
|
||||||
files: {
|
files: {
|
||||||
'<%= config.site %>/<%= config.assets.js %>/picturefill.min.js': [
|
'<%= config.site %>/<%= config.assets.js %>/picturefill.min.js': [
|
||||||
'bower_components/picturefill/picturefill.js'
|
'bower_components/picturefill/dist/picturefill.js'
|
||||||
],
|
],
|
||||||
'<%= config.site %>/<%= config.assets.js %>/kremalicious3.min.js': [
|
'<%= config.site %>/<%= config.assets.js %>/kremalicious3.min.js': [
|
||||||
'bower_components/infinitescroll/index.js',
|
'bower_components/infinitescroll/index.js',
|
||||||
@ -118,7 +118,7 @@ module.exports = function(grunt){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// image optimization
|
// image optimization
|
||||||
imagemin: {
|
imagemin: {
|
||||||
assets: {
|
assets: {
|
||||||
@ -146,7 +146,7 @@ module.exports = function(grunt){
|
|||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// dev server
|
// dev server
|
||||||
connect: {
|
connect: {
|
||||||
server: {
|
server: {
|
||||||
@ -157,7 +157,7 @@ module.exports = function(grunt){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// watch
|
// watch
|
||||||
watch: {
|
watch: {
|
||||||
options: {
|
options: {
|
||||||
@ -173,8 +173,8 @@ module.exports = function(grunt){
|
|||||||
},
|
},
|
||||||
jekyll: {
|
jekyll: {
|
||||||
files: [
|
files: [
|
||||||
'<%= config.src %>/**/*.html',
|
'<%= config.src %>/**/*.html',
|
||||||
'<%= config.src %>/*.xml',
|
'<%= config.src %>/*.xml',
|
||||||
'<%= config.src %>/*.json',
|
'<%= config.src %>/*.json',
|
||||||
'<%= config.src %>/.htaccess',
|
'<%= config.src %>/.htaccess',
|
||||||
'<%= config.src %>/_includes/**',
|
'<%= config.src %>/_includes/**',
|
||||||
@ -185,7 +185,7 @@ module.exports = function(grunt){
|
|||||||
tasks: ['jekyll:development', 'less', 'cmq', 'cssmin', 'uglify']
|
tasks: ['jekyll:development', 'less', 'cmq', 'cssmin', 'uglify']
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
// assets versioning
|
// assets versioning
|
||||||
rev: {
|
rev: {
|
||||||
files: {
|
files: {
|
||||||
@ -194,7 +194,7 @@ module.exports = function(grunt){
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// updating assets paths in html/css
|
// updating assets paths in html/css
|
||||||
usemin: {
|
usemin: {
|
||||||
html: ['<%= config.build %>/**/*.html'],
|
html: ['<%= config.build %>/**/*.html'],
|
||||||
@ -205,7 +205,7 @@ module.exports = function(grunt){
|
|||||||
assetsDirs: ['<%= config.build %>', '<%= config.build %>/assets/{css,js,img,fonts}']
|
assetsDirs: ['<%= config.build %>', '<%= config.build %>/assets/{css,js,img,fonts}']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// rsync stuff around
|
// rsync stuff around
|
||||||
rsync: {
|
rsync: {
|
||||||
options: {
|
options: {
|
||||||
@ -242,16 +242,16 @@ module.exports = function(grunt){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Load NPM Tasks, smart code stolen from @bluemaex <https://github.com/bluemaex>
|
// Load NPM Tasks, smart code stolen from @bluemaex <https://github.com/bluemaex>
|
||||||
require('fs').readdirSync('node_modules').filter(function (file) {
|
require('fs').readdirSync('node_modules').filter(function (file) {
|
||||||
return file && file.indexOf('grunt-') > -1;
|
return file && file.indexOf('grunt-') > -1;
|
||||||
}).forEach(function (file) {
|
}).forEach(function (file) {
|
||||||
grunt.loadNpmTasks(file);
|
grunt.loadNpmTasks(file);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Default Task, assets only
|
// Default Task, assets only
|
||||||
grunt.registerTask('default', [
|
grunt.registerTask('default', [
|
||||||
'less',
|
'less',
|
||||||
@ -261,7 +261,7 @@ module.exports = function(grunt){
|
|||||||
'connect',
|
'connect',
|
||||||
'watch'
|
'watch'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Full Dev server
|
// Full Dev server
|
||||||
grunt.registerTask('server', [
|
grunt.registerTask('server', [
|
||||||
'clean:site',
|
'clean:site',
|
||||||
@ -274,7 +274,7 @@ module.exports = function(grunt){
|
|||||||
'connect',
|
'connect',
|
||||||
'watch'
|
'watch'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Production build
|
// Production build
|
||||||
grunt.registerTask('build', [
|
grunt.registerTask('build', [
|
||||||
'clean',
|
'clean',
|
||||||
@ -290,12 +290,12 @@ module.exports = function(grunt){
|
|||||||
'rev',
|
'rev',
|
||||||
'usemin'
|
'usemin'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Optimze media
|
// Optimze media
|
||||||
grunt.registerTask('mediamin', [
|
grunt.registerTask('mediamin', [
|
||||||
'imagemin:media'
|
'imagemin:media'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Deploy
|
// Deploy
|
||||||
grunt.registerTask('deploy', [
|
grunt.registerTask('deploy', [
|
||||||
'rsync:deploy'
|
'rsync:deploy'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user