Reloadr
Reloadr copied to clipboard
Server Side Problems
Script works fine updating css and javascript files but when trying to watch .php files it doesn't seem to work. Here is what my config options look like. (WordPress theme)
Reloadr.go({
client: [
'<?php bloginfo("stylesheet_directory") ?>/js/TSC.jquery.js',
'<?php bloginfo("stylesheet_directory") ?>/js/TSCadmin.jquery.js',
'<?php bloginfo("stylesheet_directory") ?>/style.css',
],
server: [
'<?php bloginfo("stylesheet_directory") ?>/front-page.php',
'<?php bloginfo("stylesheet_directory") ?>/footer.php',
'<?php bloginfo("stylesheet_directory") ?>/header.php',
'<?php bloginfo("stylesheet_directory") ?>/index.php',
'<?php bloginfo("stylesheet_directory") ?>/page.php',
],
path: '<?php bloginfo("stylesheet_directory") ?>/reloadr.php',
frequency: 4000
});
Any insights would be greatly appreciated.
I have this working under wordpress, and may release my code at some point. I made a snapin that scans my theme folder for php and css files and adds them to the header calling Reloader.js. I note that under the WAMP server I've got setup that bloginfo() wouldn't serve up the proper path. In the end I had to use this:
$tdir = str_replace(get_bloginfo("url"),'',get_bloginfo("template_directory"));
To get the proper path. (From server root, not server document root.)