Преглед изворни кода

fix: rename `auto-reload` to `live-reload`

version-14
Pruthvi Patel пре 3 година
родитељ
комит
d99403393a
3 измењених фајлова са 12 додато и 8 уклоњено
  1. +2
    -2
      esbuild/esbuild.js
  2. +6
    -2
      frappe/build.py
  3. +4
    -4
      frappe/public/js/frappe/build_events/BuildSuccess.vue

+ 2
- 2
esbuild/esbuild.js Прегледај датотеку

@@ -44,7 +44,7 @@ let argv = yargs
type: "boolean",
description: "Run in watch mode and rebuild on file changes"
})
.option("auto-reload", {
.option("live-reload", {
type: "boolean",
description: `Automatically reload webpages when assets are rebuilt.
Can only be used with the --watch flag.`
@@ -481,7 +481,7 @@ async function notify_redis({ error, success }) {
if (success) {
payload = {
success: true,
autoreload: argv["auto-reload"]
live_reload: argv["live-reload"]
};
}



+ 6
- 2
frappe/build.py Прегледај датотеку

@@ -235,8 +235,12 @@ def watch(apps=None):
if apps:
command += " --apps {apps}".format(apps=apps)

if frappe.conf.autoreload_on_build:
command += " --auto-reload"
live_reload = frappe.conf.live_reload
if "LIVE_RELOAD" in os.environ:
live_reload = os.environ["LIVE_RELOAD"]

if live_reload:
command += " --live-reload"

check_node_executable()
frappe_app_path = frappe.get_app_path("frappe", "..")


+ 4
- 4
frappe/public/js/frappe/build_events/BuildSuccess.vue Прегледај датотеку

@@ -5,7 +5,7 @@
>
Compiled successfully
<a
v-if="!autoreload"
v-if="!live_reload"
class="ml-4 text-white underline" href="/" @click.prevent="reload"
>
Refresh
@@ -18,13 +18,13 @@ export default {
data() {
return {
is_shown: false,
autoreload: false,
live_reload: false,
};
},
methods: {
show(data) {
if (data.autoreload) {
this.autoreload = true;
if (data.live_reload) {
this.live_reload = true;
this.reload();
}



Loading…
Откажи
Сачувај