diff --git a/.vscode/yunzai.code-snippets b/.vscode/yunzai.code-snippets index 0967ef4..1787bbd 100644 --- a/.vscode/yunzai.code-snippets +++ b/.vscode/yunzai.code-snippets @@ -1 +1,46 @@ -{} +{ + "Test Plugin Class": { + "prefix": "plugin", + "body": [ + "import { Plugin } from 'yunzai/core'", + "export class App extends Plugin {", + " constructor() {", + " super()", + " this.rule = [", + " $1", + " ]", + " }", + "}" + ], + "description": "Create a new App plugin class for Yunzai" + }, + "Image Class with Puppeteer": { + "prefix": "image", + "body": [ + "import React from 'react'", + "import { Component, Puppeteer } from 'yunzai/utils'", + "const Com = new Component()", + "export class Image {", + " Pup: typeof Puppeteer.prototype = null", + " constructor() {", + " // init", + " this.Pup = new Puppeteer()", + " // start", + " this.Pup.start()", + " }", + " /**", + " * 为指定用户生成html 生成指定数据下的html文件", + " * @returns", + " */", + " createHello(uid: number, Props) {", + " const Address = Com.create(<>, {", + " join_dir: 'hello',", + " html_name: `${uid}.html`,", + " })", + " return this.Pup.render(Address)", + " }", + "}" + ], + "description": "Creates a class that utilizes Puppeteer from yunzai/utils for rendering HTML." + } +} diff --git a/README.md b/README.md index 8dcf123..00bba9f 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,12 @@ # Miao-Yunzai -你应该积极使用 V3 ,它仍然是长期支持并维护的版本 - > 必要环境 Windows/Linux + Chrome/Chromium/Edge > 必要环境 Node.js>16.14.0 + Redis>5.0.0 > 推荐环境 Node.js@18.18.2 + Rediss@6.0.0 -[!点击阅读Miao-Yunzai文档了解更多](https://ningmengchongshui.github.io/Miao-Yunzai-Docs/) +[☞点击阅读文档了解更多](https://ningmengchongshui.github.io/Miao-Yunzai-Docs/) ## 使用教程 @@ -60,18 +58,6 @@ npm run app npm run login ``` -- 托管 - -```sh -npm run start -``` - -- 杀死进程 - -```sh -npm run kill -``` - ## 致谢 | Nickname | Contribution |