Skip to content

Instantly share code, notes, and snippets.

@Asikur22
Created June 30, 2024 19:07
Show Gist options
  • Save Asikur22/8a6ee72a859e204d2735f5e605b00638 to your computer and use it in GitHub Desktop.
Save Asikur22/8a6ee72a859e204d2735f5e605b00638 to your computer and use it in GitHub Desktop.
WordPress hot reload with browser-sync
{
"name" : "wp-hot-reloader",
"version" : "1.0",
"description" : "WordPress hot reload with browser-sync",
"author" : "Asiqur Rahman <asiq.webdev@gmail.com> (https://www.asique.net/)",
"license" : "GPL-2.0-or-later",
"config" : {
"host" : "wp.local",
"port" : "8080"
},
"scripts" : {
"start" : "browser-sync start --proxy=http://$npm_package_config_host --host=$npm_package_config_host --open=external --port=$npm_package_config_port --files '**/*.php, **/*.css, **/*.js'"
},
"devDependencies" : {
"browser-sync" : "^2.29.3"
}
}
@Asikur22
Copy link
Author

change config host & port according to your project needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment