{siteConfig.tagline}
@@ -30,7 +30,11 @@ function HomepageHeader() { 768 + ? 'https://smallmain.github.io/cocos-enhance-kit/demo/v1.0.0/web-desktop/index.html' + : 'https://smallmain.github.io/cocos-enhance-kit/demo/v1.0.0/web-mobile/index.html' + } style={{ marginRight: 20 }} > 查看演示 diff --git a/docs/static/img/favicon.ico b/docs/static/img/favicon.ico index 1cb23c3a..2c82f061 100644 Binary files a/docs/static/img/favicon.ico and b/docs/static/img/favicon.ico differ diff --git a/docs/static/img/logo.png b/docs/static/img/logo.png index 1cb23c3a..394cfb9e 100644 Binary files a/docs/static/img/logo.png and b/docs/static/img/logo.png differ diff --git a/docs/static/img/logo2.png b/docs/static/img/logo2.png index d13866fa..81692b8b 100644 Binary files a/docs/static/img/logo2.png and b/docs/static/img/logo2.png differ diff --git a/docs/versioned_docs/version-1.0.0/intro.md b/docs/versioned_docs/version-1.0.0/intro.md index 590c0322..b0ea5ce7 100644 --- a/docs/versioned_docs/version-1.0.0/intro.md +++ b/docs/versioned_docs/version-1.0.0/intro.md @@ -68,7 +68,7 @@ hide_title: true - **[新特性] Spine 组件支持参与动态图集、与其它组件合批、使用 SpriteFrame 换装** - [新特性] cc.Label、cc.RichText、cc.Sprite、cc.MotionStreak、Spine 组件支持使用多纹理材质,并支持自动切换材质机制 - [新特性] cc.RichText 支持使用自定义材质 -- [修复] 直接修改 Effect 的属性不回导致其变体的 hash 值刷新 +- [修复] 直接修改 Effect 的属性不会导致其变体的 hash 值刷新 - [修复] CHAR 缓存模式 hash 计算可能会有重复的问题 - [调整] 默认禁用 Label 原生 TTF 渲染器 diff --git a/docs/versioned_docs/version-1.0.0/update-log.md b/docs/versioned_docs/version-1.0.0/update-log.md index aafefcb9..e80a6ecb 100644 --- a/docs/versioned_docs/version-1.0.0/update-log.md +++ b/docs/versioned_docs/version-1.0.0/update-log.md @@ -16,7 +16,7 @@ sidebar_position: 7 - **[新特性] Spine 组件支持参与动态图集、与其它组件合批、使用 SpriteFrame 换装** - [新特性] cc.Label、cc.RichText、cc.Sprite、cc.MotionStreak、Spine 组件支持使用多纹理材质,并支持自动切换材质机制 - [新特性] cc.RichText 支持使用自定义材质 -- [修复] 直接修改 Effect 的属性不回导致其变体的 hash 值刷新 +- [修复] 直接修改 Effect 的属性不会导致其变体的 hash 值刷新 - [修复] CHAR 缓存模式 hash 计算可能会有重复的问题 - [调整] 默认禁用 Label 原生 TTF 渲染器 diff --git a/docs/versioned_docs/version-1.1.0/intro.md b/docs/versioned_docs/version-1.1.0/intro.md index 225bca5a..775f23ea 100644 --- a/docs/versioned_docs/version-1.1.0/intro.md +++ b/docs/versioned_docs/version-1.1.0/intro.md @@ -75,7 +75,7 @@ hide_title: true - **[新特性] Spine 组件支持参与动态图集、与其它组件合批、使用 SpriteFrame 换装** - [新特性] cc.Label、cc.RichText、cc.Sprite、cc.MotionStreak、Spine 组件支持使用多纹理材质,并支持自动切换材质机制 - [新特性] cc.RichText 支持使用自定义材质 -- [修复] 直接修改 Effect 的属性不回导致其变体的 hash 值刷新 +- [修复] 直接修改 Effect 的属性不会导致其变体的 hash 值刷新 - [修复] CHAR 缓存模式 hash 计算可能会有重复的问题 - [调整] 默认禁用 Label 原生 TTF 渲染器 diff --git a/docs/versioned_docs/version-1.1.0/update-log.md b/docs/versioned_docs/version-1.1.0/update-log.md index 7203c088..c535525f 100644 --- a/docs/versioned_docs/version-1.1.0/update-log.md +++ b/docs/versioned_docs/version-1.1.0/update-log.md @@ -26,7 +26,7 @@ sidebar_position: 7 - **[新特性] Spine 组件支持参与动态图集、与其它组件合批、使用 SpriteFrame 换装** - [新特性] cc.Label、cc.RichText、cc.Sprite、cc.MotionStreak、Spine 组件支持使用多纹理材质,并支持自动切换材质机制 - [新特性] cc.RichText 支持使用自定义材质 -- [修复] 直接修改 Effect 的属性不回导致其变体的 hash 值刷新 +- [修复] 直接修改 Effect 的属性不会导致其变体的 hash 值刷新 - [修复] CHAR 缓存模式 hash 计算可能会有重复的问题 - [调整] 默认禁用 Label 原生 TTF 渲染器 diff --git a/docs/versioned_docs/version-1.2.0/intro.md b/docs/versioned_docs/version-1.2.0/intro.md index 2d3c89fe..06ab0d71 100644 --- a/docs/versioned_docs/version-1.2.0/intro.md +++ b/docs/versioned_docs/version-1.2.0/intro.md @@ -81,7 +81,7 @@ hide_title: true - **[新特性] Spine 组件支持参与动态图集、与其它组件合批、使用 SpriteFrame 换装** - [新特性] cc.Label、cc.RichText、cc.Sprite、cc.MotionStreak、Spine 组件支持使用多纹理材质,并支持自动切换材质机制 - [新特性] cc.RichText 支持使用自定义材质 -- [修复] 直接修改 Effect 的属性不回导致其变体的 hash 值刷新 +- [修复] 直接修改 Effect 的属性不会导致其变体的 hash 值刷新 - [修复] CHAR 缓存模式 hash 计算可能会有重复的问题 - [调整] 默认禁用 Label 原生 TTF 渲染器 diff --git a/docs/versioned_docs/version-1.2.0/update-log.md b/docs/versioned_docs/version-1.2.0/update-log.md index 0b997875..ce48f0fc 100644 --- a/docs/versioned_docs/version-1.2.0/update-log.md +++ b/docs/versioned_docs/version-1.2.0/update-log.md @@ -35,7 +35,7 @@ sidebar_position: 7 - **[新特性] Spine 组件支持参与动态图集、与其它组件合批、使用 SpriteFrame 换装** - [新特性] cc.Label、cc.RichText、cc.Sprite、cc.MotionStreak、Spine 组件支持使用多纹理材质,并支持自动切换材质机制 - [新特性] cc.RichText 支持使用自定义材质 -- [修复] 直接修改 Effect 的属性不回导致其变体的 hash 值刷新 +- [修复] 直接修改 Effect 的属性不会导致其变体的 hash 值刷新 - [修复] CHAR 缓存模式 hash 计算可能会有重复的问题 - [调整] 默认禁用 Label 原生 TTF 渲染器 diff --git a/media/favicon.ico b/media/favicon.ico new file mode 100644 index 00000000..2c82f061 Binary files /dev/null and b/media/favicon.ico differ diff --git a/media/logo-round.png b/media/logo-round.png new file mode 100644 index 00000000..55c70d9f Binary files /dev/null and b/media/logo-round.png differ diff --git a/media/logo-round.psd b/media/logo-round.psd new file mode 100644 index 00000000..ab49deb6 Binary files /dev/null and b/media/logo-round.psd differ diff --git a/media/logo-round@0.1x.png b/media/logo-round@0.1x.png new file mode 100644 index 00000000..65ae88c2 Binary files /dev/null and b/media/logo-round@0.1x.png differ diff --git a/media/logo-round@0.25x.png b/media/logo-round@0.25x.png new file mode 100644 index 00000000..81692b8b Binary files /dev/null and b/media/logo-round@0.25x.png differ diff --git a/media/logo-round@0.5x.png b/media/logo-round@0.5x.png new file mode 100644 index 00000000..394cfb9e Binary files /dev/null and b/media/logo-round@0.5x.png differ diff --git a/media/logo-without-text.png b/media/logo-without-text.png new file mode 100644 index 00000000..d6930872 Binary files /dev/null and b/media/logo-without-text.png differ diff --git a/media/logo-without-text.psd b/media/logo-without-text.psd new file mode 100644 index 00000000..890cae5e Binary files /dev/null and b/media/logo-without-text.psd differ diff --git a/media/logo-without-text@0.1x.png b/media/logo-without-text@0.1x.png new file mode 100644 index 00000000..dab253c3 Binary files /dev/null and b/media/logo-without-text@0.1x.png differ diff --git a/media/logo-without-text@0.25x.png b/media/logo-without-text@0.25x.png new file mode 100644 index 00000000..c176b45f Binary files /dev/null and b/media/logo-without-text@0.25x.png differ diff --git a/media/logo-without-text@0.5x.png b/media/logo-without-text@0.5x.png new file mode 100644 index 00000000..17c179ff Binary files /dev/null and b/media/logo-without-text@0.5x.png differ diff --git a/media/logo-without-text@0.75x.png b/media/logo-without-text@0.75x.png new file mode 100644 index 00000000..82588d01 Binary files /dev/null and b/media/logo-without-text@0.75x.png differ diff --git a/media/logo.psd b/media/logo.psd new file mode 100644 index 00000000..6ef7fe09 Binary files /dev/null and b/media/logo.psd differ diff --git a/scripts/index.js b/scripts/index.js new file mode 100644 index 00000000..6f13a79f --- /dev/null +++ b/scripts/index.js @@ -0,0 +1,446 @@ +import { confirm, input } from "@inquirer/prompts"; +import { $ } from "execa"; +import gracefulFs from "graceful-fs"; +import { Octokit } from 'octokit'; +import { basename, extname, join } from "path"; +import { cwd, env } from "process"; +import { maxSatisfying } from "semver"; +import { Client } from 'ssh2'; +import { Zip } from 'zip-lib'; +const { createReadStream, copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } = gracefulFs; + +// 公共函数 +const $$ = $({ stdout: 'inherit', stderr: 'inherit' }); + +function copyDirectory(sourceDir, targetDir) { + // 创建目标目录 + mkdirSync(targetDir, { recursive: true }); + + // 读取源目录中的文件和子目录 + const files = readdirSync(sourceDir); + + // 遍历源目录中的文件和子目录 + files.forEach((file) => { + const sourcePath = join(sourceDir, file); + const targetPath = join(targetDir, file); + + // 判断是否为文件 + if (statSync(sourcePath).isFile()) { + // 如果是文件,则直接拷贝到目标目录 + copyFileSync(sourcePath, targetPath); + } else { + // 如果是子目录,则递归调用copyDir函数进行拷贝 + copyDir(sourcePath, targetPath); + } + }); +} + +async function uploadBySFTP(host, port, username, password, filePath, targetFilePath) { + return new Promise((resolve, reject) => { + const client = new Client(); + + client.on('ready', () => { + console.log('SSH 连接已建立'); + client.sftp((err, sftp) => { + if (err) { + reject(err); + client.end(); + return; + } + sftp.exists(targetFilePath, hasErr => { + if (!hasErr) { + resolve(); + client.end(); + return; + } + + const readStream = createReadStream(filePath); + const writeStream = sftp.createWriteStream(targetFilePath); + + writeStream.on('close', () => { + resolve(); + client.end(); + }); + + writeStream.on('error', (err) => { + reject(err); + client.end(); + }); + + readStream.pipe(writeStream); + }); + }); + }); + + client.on('error', (err) => { + reject(err); + }); + + client.connect({ + host, + port, + username, + password, + }); + }); +} + +// 试运行 +const DRYRUN = true; + +// 目录 +const masterPath = cwd(); +const sourcePath = await input({ + message: "请输入源码分支目录:", + required: true, + default: "/Users/smallmain/Documents/Work/cocos-service-pack-src", +}); +const extensionPath = await input({ + message: "请输入付费扩展目录(如果有的话):", + required: false, + default: "/Users/smallmain/Documents/Work/cocos-service-pack-extension", +}); + +console.log("主分支目录:", masterPath); +console.log("源码目录:", sourcePath); +console.log("付费扩展目录:", extensionPath); + +// 版本号 +const engineVersion = await input({ + message: "请输入发布的引擎版本:", + required: true, + default: "1.0.0", +}); +const kitVersion = await input({ + message: "请输入发布的社区版版本:", + required: true, + default: "1.0.0", +}); + +// 更新源码 VERSION.md +readdirSync(sourcePath, { + recursive: true, + encoding: "utf-8", +}) + .filter(path => basename(path) === "VERSION.md") + .forEach(path => { + const filePath = join(sourcePath, path); + + if (!DRYRUN) { + writeFileSync(filePath, kitVersion); + } + + console.log("更新文件", filePath); + }); + +// 更新源码 README.md +const SOURCE_README = `Cocos Enhance Kit v${kitVersion} 引擎源码\n\n适配 v${engineVersion} 引擎\n`; +const sourceReadmePath = join(sourcePath, "README.md"); +if (!DRYRUN) { + writeFileSync(sourceReadmePath, SOURCE_README); +} +console.log("更新文件", sourceReadmePath); + +// 更新 sp.js 版本号 +const SPJS_REGEX = /version:\s*"(.*?)"/; +const spjsPath = join(sourcePath, "engine/cocos2d/core/sp/sp.js"); +const newSpjsContent = readFileSync(spjsPath, { encoding: "utf-8" }) + .replace(SPJS_REGEX, `version: "${kitVersion}"`); +if (!DRYRUN) { + writeFileSync(spjsPath, newSpjsContent); +} +console.log("更新文件", spjsPath); + +// 确保存在相应版本的支持性扩展 +const supportPath = join(masterPath, "extension", `v${kitVersion}`, "enhance-kit-support"); +if (!existsSync(supportPath)) { + const versions = readdirSync(join(masterPath, "extension")); + const latestVersion = maxSatisfying(versions, "*"); + const needCopy = await confirm({ + message: `未发现 v${kitVersion} 版本的支持性扩展,是否从 ${latestVersion} 拷贝?`, + default: true, + }); + if (needCopy) { + const src = join(masterPath, "extension", latestVersion); + const dest = join(masterPath, "extension", `v${kitVersion}`); + + if (!DRYRUN) { + copyDirectory(src, dest); + } + + console.log("拷贝目录", src, "->", dest); + } +} + +// 确保支持性扩展 package.json 版本号正确 +const supportPackageJsonPath = join(supportPath, "package.json"); +const supportPackageJson = JSON.parse(readFileSync(supportPackageJsonPath, { encoding: "utf-8" })); +supportPackageJson.version = kitVersion; +if (!DRYRUN) { + writeFileSync(supportPackageJsonPath, JSON.stringify(supportPackageJson, null, 2)); +} +console.log("更新文件", supportPackageJsonPath); + +// 准备压缩包 +const cppPath = join(sourcePath, "cocos2d-x"); +const cppBuildPath = join(cppPath, "build/build"); +const jsPath = join(sourcePath, "engine"); +const jsNpmPath = join(jsPath, "node_modules"); +const jsbPath = join(sourcePath, "jsb-adapter"); +const minigamePath = join(sourcePath, "adapters"); +const dtsPath = join(sourcePath, "creator-sp.d.ts"); +const zipPath = join(masterPath, `cocos-enhance-kit-v${kitVersion}-v${engineVersion}.zip`); + +if (!DRYRUN) { + rmSync(cppBuildPath, { force: true, recursive: true }); + rmSync(jsNpmPath, { force: true, recursive: true }); +} +console.log("删除目录", cppBuildPath); +console.log("删除目录", jsNpmPath); +if (!DRYRUN) { + console.log("开始编译 JavaScript 引擎"); + try { + await $$({ cwd: jsPath })`gulp build-dev`; + } catch (error) { + await confirm({ + message: `自动编译 JavaScript 引擎失败,请手动编译后继续`, + default: true, + }); + } +} +console.log("已编译 JavaScript 引擎"); +if (!DRYRUN) { + console.log("开始编译当前平台的原生模拟器"); + try { + await $$({ cwd: cppPath })`gulp gen-simulator`; + await $$({ cwd: cppPath })`gulp update-simulator-config`; + } catch (error) { + await confirm({ + message: `自动编译当前平台的原生模拟器失败,请手动编译后继续`, + default: true, + }); + } +} +console.log("已编译当前平台的原生模拟器"); + +// 创建压缩包 +if (!DRYRUN) { + const sourceZipFile = new Zip(); + console.log("正在压缩", jsPath); + sourceZipFile.addFolder(jsPath, "engine"); + console.log("正在压缩", cppPath); + sourceZipFile.addFolder(cppPath, "cocos2d-x"); + console.log("正在压缩", jsbPath); + sourceZipFile.addFolder(jsbPath, "jsb-adapter"); + console.log("正在压缩", minigamePath); + sourceZipFile.addFolder(minigamePath, "adapters"); + console.log("正在压缩", supportPath); + sourceZipFile.addFolder(supportPath, "enhance-kit-support"); + console.log("正在压缩", dtsPath); + sourceZipFile.addFile(dtsPath); + await sourceZipFile.archive(zipPath); +} +console.log("已压缩至文件", zipPath); + +// [付费扩展] +if (extensionPath) { + // 创建压缩包 + const payZipPath = join(masterPath, `${kitVersion}.zip`); + if (!DRYRUN) { + const sourceZipFile = new Zip(); + console.log("正在压缩", jsPath); + sourceZipFile.addFolder(jsPath, `${kitVersion}/engine`); + console.log("正在压缩", cppPath); + sourceZipFile.addFolder(cppPath, `${kitVersion}/cocos2d-x`); + console.log("正在压缩", jsbPath); + sourceZipFile.addFolder(jsbPath, `${kitVersion}/jsb-adapter`); + console.log("正在压缩", minigamePath); + sourceZipFile.addFolder(minigamePath, `${kitVersion}/adapters`); + console.log("正在压缩", dtsPath); + sourceZipFile.addFile(dtsPath, `${kitVersion}/creator-sp.d.ts`); + await sourceZipFile.archive(payZipPath); + } + console.log("已压缩至文件", payZipPath); + + // 上传至 downloadcdn.smallmain.com + const payZipUrl = `http://downloadcdn.smallmain.com/cocos-enhance-kit/${engineVersion}/${kitVersion}.zip`; + if (!DRYRUN) { + console.log("正在上传文件", payZipPath); + await uploadBySFTP( + env.HOST, + env.PORT, + env.USERNAME, + env.PASSWORD, + payZipPath, + `/www/wwwroot/download.smallmain.com/cocos-enhance-kit/${engineVersion}/${kitVersion}.zip`, + ); + } + console.log("已上传文件", payZipUrl); + + // 手动修改 config.json + await confirm({ + message: `请将压缩文件上传至各网盘,并修改 config.json 指向下载链接`, + default: true, + }); + + // 手动修改 package.json 的 version 字段 + await confirm({ + message: `请修改 package.json 的 version 确定版本号后继续`, + default: true, + }); + + // 压缩为扩展 zip 文件 + const extensionVersion = JSON.parse(readFileSync(join(extensionPath, "package.json"), { encoding: "utf-8" })).version; + const extensionZipPath = join(masterPath, `cocos-enhance-kit-extension-v${extensionVersion}.zip`); + if (!DRYRUN) { + const sourceZipFile = new Zip(); + readdirSync(extensionPath, { withFileTypes: true }) + .filter(v => v.name !== "packages") + .forEach(v => { + const path = join(v.path, v.name); + console.log("正在压缩", path); + if (v.isFile()) { + sourceZipFile.addFile(path, v.name); + } else { + sourceZipFile.addFolder(path, v.name); + } + }); + + // packages 目录需要仅保留 backup 目录,所以特殊处理 + const packagesPath = join(extensionPath, "packages"); + readdirSync(packagesPath, { withFileTypes: true }) + .forEach(v => { + if (v.isFile()) { + const path = join(v.path, v.name); + console.log("正在压缩", path); + sourceZipFile.addFile(path, join("packages", v.name)); + } else { + const relPath = join(v.name, "backup"); + const path = join(v.path, relPath); + console.log("正在压缩", path); + sourceZipFile.addFolder(path, join("packages", relPath)); + } + }); + + await sourceZipFile.archive(extensionZipPath); + } + console.log("已压缩至文件", extensionZipPath); + + // 手动上传到 Cocos Store + await confirm({ + message: `请手动上传 zip 文件到 Cocos Store`, + default: true, + }); +} + +// 更新 Demo +const demoBuildPath = join(masterPath, "demo/build"); +const demoDesktopBuildPath = join(demoBuildPath, "web-desktop"); +const demoMobileBuildPath = join(demoBuildPath, "web-mobile"); +const demoTargetPath = join(masterPath, "docs/static/demo", `v${kitVersion}`); +const demoDesktopTargetPath = join(demoTargetPath, "web-desktop"); +const demoMobileTargetPath = join(demoTargetPath, "web-mobile"); +if (!existsSync(demoTargetPath)) { + await confirm({ + message: `请测试并编译 Demo 项目,然后继续操作`, + default: true, + }); + if (!DRYRUN) { + copyDirectory(demoDesktopBuildPath, demoDesktopTargetPath); + copyDirectory(demoMobileBuildPath, demoMobileTargetPath); + } + console.log("拷贝目录", demoDesktopBuildPath, "->", demoDesktopTargetPath); + console.log("拷贝目录", demoMobileBuildPath, "->", demoMobileTargetPath); +} +readdirSync(masterPath, { + recursive: true, + encoding: "utf-8", +}) + .filter(path => [".ts", ".tsx", ".js", ".jsx", ".md", ".mdx"].includes(extname(path))) + .forEach(path => { + const filePath = join(masterPath, path); + + if (!statSync(filePath).isFile()) { + return; + } + + const content = readFileSync(filePath, { encoding: "utf-8" }); + const regexDesktop = /https:\/\/smallmain\.github\.io\/cocos-enhance-kit\/demo\/(v\d+\.\d+\.\d+)\/web-desktop\/index\.html/g; + const regexMobile = /https:\/\/smallmain\.github\.io\/cocos-enhance-kit\/demo\/(v\d+\.\d+\.\d+)\/web-mobile\/index\.html/g; + + if (!DRYRUN) { + writeFileSync(filePath, content.replace(regexDesktop, `https://smallmain.github.io/cocos-enhance-kit/demo/${targetVersion}/web-desktop/index.html`).replace(regexMobile, `https://smallmain.github.io/cocos-enhance-kit/demo/${targetVersion}/web-mobile/index.html`)); + } + + if (regexDesktop.test(content) || regexMobile.test(content)) { + console.log("更新文件", filePath); + } + }); + + +// 上传到 Github Release +const tag = `v${kitVersion}`; +let releaseUrl = "(undefined)"; +const needPublish = await confirm({ + message: `是否上传至 Github Release?(请先在源码分支创建 '${tag}' Tag)`, + default: true, +}); +if (needPublish && !DRYRUN) { + + const octokit = new Octokit({ + auth: env.GITHUB_TOKEN, + }); + + console.log("创建 Release:", tag); + + let releaseId = 0; + try { + const { data } = await octokit.rest.repos.getReleaseByTag({ + owner: "smallmain", + repo: "cocos-enhance-kit", + tag: tag, + }); + releaseId = data.id; + releaseUrl = data.html_url; + } catch (error) { + const { data } = await octokit.rest.repos.createRelease({ + owner: "smallmain", + repo: "cocos-enhance-kit", + name: tag, + tag_name: tag, + body: `适配 Cocos Creator v${engineVersion} 版本\n\n> 注意,如果你需要使用模拟器预览,请按照官方的 [引擎定制文档](https://docs.cocos.com/creator/2.4/manual/zh/advanced-topics/engine-customization.html#25-%E7%BC%96%E8%AF%91%E6%A8%A1%E6%8B%9F%E5%99%A8) 重新编译原生模拟器。`, + prerelease: false, + make_latest: "legacy", + }); + releaseId = data.id; + releaseUrl = data.html_url; + } + + console.log("上传至 Release:", zipPath); + const fileContent = readFileSync(zipPath); + await octokit.rest.repos.uploadReleaseAsset({ + owner: "smallmain", + repo: "cocos-enhance-kit", + release_id: releaseId, + data: fileContent, + name: basename(zipPath), + headers: { + 'content-type': 'application/zip', + }, + }); +} +console.log("已发布到 Github Release:", tag); + +// 手动更新 Github Release 的更新日志 +if (needPublish) { + await confirm({ + message: `请前往 ${releaseUrl} 填写更新日志`, + default: true, + }); +} + +// 手动发布新版本文档 +await confirm({ + message: `请使用命令 npm run docusaurus docs:version 1.1.0 创建新版本文档,并在 docs 目录执行 npm run deploy 发布`, + default: true, +}); diff --git a/scripts/package.json b/scripts/package.json new file mode 100644 index 00000000..ce92faf7 --- /dev/null +++ b/scripts/package.json @@ -0,0 +1,24 @@ +{ + "name": "scripts", + "version": "1.0.0", + "description": "", + "main": "index.js", + "type": "module", + "author": "", + "license": "ISC", + "dependencies": { + "@inquirer/prompts": "^7.0.0", + "execa": "^9.4.1", + "graceful-fs": "^4.2.11", + "octokit": "^4.0.2", + "semver": "^7.6.3", + "ssh2": "^1.16.0", + "zip-lib": "^1.0.4" + }, + "devDependencies": { + "@types/graceful-fs": "^4.1.9", + "@types/node": "^20", + "@types/semver": "^7.5.8", + "@types/ssh2": "^1.15.1" + } +}