Skip to content

Instantly share code, notes, and snippets.

@joliveras
Last active January 7, 2016 11:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joliveras/5f1a36c26ef555545703 to your computer and use it in GitHub Desktop.
Save joliveras/5f1a36c26ef555545703 to your computer and use it in GitHub Desktop.
testLivereload
var gulp = require('gulp'),
livereload = require('gulp-livereload');
gulp.task('php', function() {
gulp.src('./*.php')
.pipe(livereload());
});
gulp.task('watch', function() {
livereload.listen();
gulp.watch('./*.php', ['php']);
});
<!doctype html>
<html lang="es">
<head>
<meta charset="utf-8" />
<title>testLivereload test</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
</head>
<body>
<p>testLivereload test</p>
</body>
</html>
{
"name": "testLivereload",
"version": "1.0.0",
"description": "Simple Gulp test",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"gulp": "^3.9.0",
"gulp-livereload": "^3.8.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment