修复一个路径问题

This commit is contained in:
Pan Qiancheng 2024-11-14 13:50:20 +08:00
parent 2f6022656b
commit 7490c7a289
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ import os from "os";
// 如果系统是windows首先采用\\ 否则默认使用/
const delimiter: string = os.platform() === 'win32' ? '\\' : '/';
export const delimiter: string = os.platform() === 'win32' ? '\\' : '/';
export const pluginPaths: {
root: string;

View File

@ -1,6 +1,6 @@
import * as vscode from 'vscode';
import { join } from 'path';
import { pluginPaths } from './paths';
import { delimiter, pluginPaths } from './paths';
import fs from 'fs';
import { CreateComponentConfig, CreateOakComponent } from '../types';
import Handlebars from 'handlebars';
@ -11,7 +11,7 @@ export const templateNames = {
index: 'index.ts',
webPcTsx: 'web.pc.tsx',
webTsx: 'web.tsx',
localeZhCN: 'locales\\zh_CN.json',
localeZhCN: `locales${delimiter}zh_CN.json`,
indexXml: 'index.xml',
indexLess: 'index.less',
renderNativeTsx: 'render.native.tsx',