Merge branch 'master' of gitee.com:yoimiya-kokomi/Miao-Yunzai into master
Signed-off-by: 绫仓优希 <sakurajuzijiang@163.com>
This commit is contained in:
commit
6d7587580f
|
@ -61,12 +61,8 @@ export default class PuppeteerRenderer {
|
||||||
* 初始化chromium
|
* 初始化chromium
|
||||||
*/
|
*/
|
||||||
async browserInit() {
|
async browserInit() {
|
||||||
if (this.browser) {
|
if (this.browser) return this.browser
|
||||||
return this.browser
|
if (this.lock) return false
|
||||||
}
|
|
||||||
if (this.lock) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
this.lock = true
|
this.lock = true
|
||||||
|
|
||||||
logger.info('puppeteer Chromium 启动中...')
|
logger.info('puppeteer Chromium 启动中...')
|
||||||
|
@ -320,9 +316,7 @@ export default class PuppeteerRenderer {
|
||||||
|
|
||||||
/** 监听配置文件 */
|
/** 监听配置文件 */
|
||||||
watch(tplFile) {
|
watch(tplFile) {
|
||||||
if (this.watcher[tplFile]) {
|
if (this.watcher[tplFile]) return
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
const watcher = chokidar.watch(tplFile)
|
const watcher = chokidar.watch(tplFile)
|
||||||
watcher.on('change', path => {
|
watcher.on('change', path => {
|
||||||
|
|
Loading…
Reference in New Issue