I am woking on a jekyll project and in the process of building my grunt file, I have been able to get the scripts to concat and minify, buy I am having problems with refreshing my browser...
This is my grunt file.
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.initConfig({
uglify: {
my_target: {
files: {
'_site/assets/js/miniFlapJacks.js': ['assets/js/*.js', 'assets/js/plugins/*.js', 'assets/js/vendor/*.js']
} //files
} //my_target
}, //uglify
watch: {
options: { livereload: true},
scripts: {
files: ['assets/js/*.js', 'assets/js/plugins/*.js', 'assets/js/vendor/*.js'],
tasks: ['uglify']
}, // scripts
html: {
files:[ '_includes/*.html',
'_layouts/*.html',
'_config.yml',
'index.html']
}
} //watch
}) //initConfig
grunt.registerTask('default', 'watch');
} //exports
This is my package.json file.
{
"name": "aortizRefresh",
"author": "antonio ortiz <17antonio.ortiz@gmail.com>",
"version" : "0.0.3",
"homepage": "http://mmistakes.github.io/so-simple-theme/",
"repository": {
"type": "git",
"url": "git://github.com/mmistakes/so-simple-theme.git"
},
"bugs": {
"url": "https://github.com/mmistakes/so-simple-theme/issues"
},
"engines": {
"node": ">= 0.10.0"
},
"dependencies": {
"grunt": "~0.4.1",
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-uglify": "~0.2.2",
"grunt-contrib-sass": "~0.7.2",
"grunt-contrib-jshint": "~0.6.3",
"grunt-recess": "~0.3.5",
"grunt-contrib-imagemin": "~0.2.0",
"grunt-svgmin": "~0.2.0"
}
}
Any help would be appreciated!
I found the answer via [1]: http://kctang.github.io/jekyll/livereload/2014/01/25/github-pages-with-jekyll-and-livereload.html/