live reloading using (grunt-connect, connect-livereload & grunt-watch)

var live_reload_port = 33333; var distribution_dir = 'app/distribution'; var scripts_source = 'app/scripts'; var connection_port = 9000; var connection_ip = 'localhost'; grunt.initConfig({ connect: { options: { port : connection_port, hostname: connection_ip }, live_reloading: { options: { middleware: function (connect) { return [ require('connect-livereload')({port: live_reload_port}), connect.static(require('path').resolve(distribution_dir)) ]; } } } }, watch: { neuter: { options: { livereload: true }, files: ['app/scripts/**/*.js'], tasks: ['neuter'] } } });

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.