mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-08-15 20:26:52 +08:00
docs: update version, deps and docs for 8.0 beta (#849)
* chore: up version and deps * chore: use pnpm CLI to get versions * add note for echarts 6 upgrade guide * remove docs script let cdn to redirect for us * Revert "remove docs script" This reverts commit 3bc237db9100864f2813249ac1693735a658e646. * update demo links
This commit is contained in:
20
scripts/utils.ts
Normal file
20
scripts/utils.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import { execSync } from "node:child_process";
|
||||
import { resolve, dirname } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
export function resolvePath(url: string, ...parts: string[]) {
|
||||
return resolve(dirname(fileURLToPath(url)), ...parts);
|
||||
}
|
||||
|
||||
type PackageVersions = {
|
||||
name: string;
|
||||
version: string;
|
||||
devDependencies: Record<string, { version: string }>;
|
||||
};
|
||||
|
||||
export function getPackageVersions(devDeps?: string[]): PackageVersions {
|
||||
const stdOut = execSync(`pnpm ls ${devDeps?.join(" ") || ""} --json`, {
|
||||
encoding: "utf-8",
|
||||
});
|
||||
return JSON.parse(stdOut)[0];
|
||||
}
|
Reference in New Issue
Block a user