lundi 29 août 2016

Grunt livereloading need extra line?

I was using Grunt for my projects, just today something happened and it stopped working, after few hours I found out that I have to add this to every page

<script src="//localhost:35729/livereload.js"></script>

Everything is working now but I can't figure out what happened, if I go to use my previous projects it is working fine without any extra lines of code.

Does someone might know what could happened and why I need to add that script line?

My grunt file is

module.exports = function(grunt){
grunt.initConfig({
pkg:grunt.file.readJSON('package.json'),

watch:{
  options:{livereload:true},
  files:['public/**','server/**'],
  tasks:[]
},
  express:{
    all:{
      options:{
        port:8000,
        hostname:'localhost',
        bases:['./public'],
        livereload:true 
      }
    }
  }
});
grunt.loadNpmTasks('grunt-contrib-imagemin')
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-express');  
grunt.registerTask('server',['express','watch']);

};




Aucun commentaire:

Enregistrer un commentaire