Parcourir la source

[vscode]更新版本号至0.0.30,支持STDF v1.x,并更新中文和英文的变更日志。

dufu1991 il y a 1 an
Parent
commit
c86c8a26c1

+ 4 - 0
packages/vscode-extension/CHANGELOG.md

@@ -1,5 +1,9 @@
 > No change log version, it means that it is just updated with the STDF version and the plug-in itself is not updated.
 
+## 0.0.30
+
+- Support STDF v1.x.
+
 ## 0.0.28
 
 - Support STDF next.

+ 4 - 0
packages/vscode-extension/CHANGELOG_CN.md

@@ -1,5 +1,9 @@
 > 没有写更新日志的版本,表示只是跟随 STDF 版本更新,未对插件本身进行更新。
 
+## 0.0.30
+
+- 支持 STDF v1.x。
+
 ## 0.0.28
 
 - 支持 STDF next。

+ 1 - 1
packages/vscode-extension/package.json

@@ -2,7 +2,7 @@
 	"name": "stdf-vscode-extension",
 	"displayName": "STDF for VS Code",
 	"description": "A VS Code extension to facilitate STDF development",
-	"version": "0.0.29",
+	"version": "0.0.30",
 	"publisher": "STDF",
 	"icon": "./src/assets/stdf-vscode-extension.png",
 	"main": "./src/extension.js",

+ 33 - 33
packages/vscode-extension/scripts/files.js

@@ -1,45 +1,45 @@
-import fs from 'fs';
+import fs from 'node:fs';
 
 // 创建 src/docs/components 目录
 // Create src/docs/components directory
 const createDoc = () => {
-    fs.mkdirSync('src/docs');
-    fs.mkdirSync('src/docs/components');
-    console.log('🎉 src/docs/components create success!');
+	fs.mkdirSync('src/docs');
+	fs.mkdirSync('src/docs/components');
+	console.log('🎉 src/docs/components create success!');
 };
 
 // 将 ../../docs/mds/components/**/api.md 和 ../../docs/mds/components/**/api_en.md 文件复制到 src/docs/components/**/ 目录下
 // Copy ../../docs/mds/components/**/api.md and ../../docs/mds/components/**/api_en.md files to src/docs/components/**/ directory
 const copyDoc = () => {
-    const components = fs.readdirSync('../../docs/mds/components');
-    // 如果 components 有 .DS_Store 文件,删除
-    // If components has .DS_Store file, delete
-    if (components.includes('.DS_Store')) {
-        components.splice(components.indexOf('.DS_Store'), 1);
-    }
+	const components = fs.readdirSync('../../docs/mds/components');
+	// 如果 components 有 .DS_Store 文件,删除
+	// If components has .DS_Store file, delete
+	if (components.includes('.DS_Store')) {
+		components.splice(components.indexOf('.DS_Store'), 1);
+	}
 
-    components.forEach(component => {
-        const files = fs.readdirSync(`../../docs/mds/components/${component}`);
-        fs.mkdirSync('src/docs/components/' + component);
-        files.forEach(file => {
-            if (file === 'api.md' || file === 'api_en.md') {
-                fs.copyFileSync(`../../docs/mds/components/${component}/${file}`, `src/docs/components/${component}/${file}`);
-            }
-        });
-    });
-    console.log(`🎉 Total copy ${components.length}*2 files!`);
+	for (const component of components) {
+		const files = fs.readdirSync(`../../docs/mds/components/${component}`);
+		fs.mkdirSync(`src/docs/components/${component}`);
+		for (const file of files) {
+			if (file === 'api.md' || file === 'api_en.md') {
+				fs.copyFileSync(`../../docs/mds/components/${component}/${file}`, `src/docs/components/${component}/${file}`);
+			}
+		}
+	}
+	console.log(`🎉 Total copy ${components.length}*2 files!`);
 };
 
 // 复制 ../../docs/site/src/data/menuList.ts 文件到 src 目录下
 // Copy ../../docs/site/src/data/menuList.ts file to src directory
 const copyMenuList = () => {
-    // 读取 ../../docs/site/src/data/menuList.ts 文件
-    const menuList = fs.readFileSync('../../docs/site/src/data/menuList.ts', 'utf-8');
-    console.log(menuList);
-    // 将其中的部分内容替换为另一个文件中的内容
-    // Replace the content of the file with the content of another file
-    const newMenuList = menuList.replace(
-        `export type MenuListChild = {
+	// 读取 ../../docs/site/src/data/menuList.ts 文件
+	const menuList = fs.readFileSync('../../docs/site/src/data/menuList.ts', 'utf-8');
+	console.log(menuList);
+	// 将其中的部分内容替换为另一个文件中的内容
+	// Replace the content of the file with the content of another file
+	const newMenuList = menuList.replace(
+		`export type MenuListChild = {
 	title: string;
 	title_zh: string;
 	title_en: string;
@@ -51,17 +51,17 @@ const copyMenuList = () => {
 export type MenuList = { class: string; class_en: string; childs: MenuListChild[] };
 
 export const menuList: MenuList[] = [`,
-        'export default ['
-    );
-    fs.writeFileSync('./src/menuList.js', newMenuList);
-    console.log('🎉 menuList copy success!');
+		'export default ['
+	);
+	fs.writeFileSync('./src/menuList.js', newMenuList);
+	console.log('🎉 menuList copy success!');
 };
 
 // 复制 ../../LICENSE 文件到 ./ 目录下
 // Copy ../../LICENSE file to ./ directory
 const copyLicense = () => {
-    fs.copyFileSync('../../LICENSE', './LICENSE');
-    console.log('🎉 LICENSE copy success!');
+	fs.copyFileSync('../../LICENSE', './LICENSE');
+	console.log('🎉 LICENSE copy success!');
 };
 
 createDoc();