File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ export enum OPEN_SOURCE_ADDRESS {
43
43
44
44
// 域名
45
45
HOME_PAGE_DOMAIN_VIP = 'https://142vip.cn' ,
46
+ HOME_PAGE_DOMAIN_408 = 'https://408.142vip.cn' ,
47
+ // HOME_PAGE_DOMAIN_JSC = 'https://js.142vip.cn',
46
48
47
49
// 证书
48
50
LICENCE_GITHUB = 'https://github.com/142vip/LICENSE' ,
Original file line number Diff line number Diff line change @@ -47,6 +47,11 @@ function getProcessEnv(key: string): string | undefined {
47
47
return undefined
48
48
}
49
49
50
+ /**
51
+ * 设置当前京城环境变量
52
+ * @param key 键
53
+ * @param value 值
54
+ */
50
55
function setProcessEnv ( key : string , value : string ) : void {
51
56
process . env [ key ] = value
52
57
}
@@ -171,7 +176,7 @@ function readdirSync(path: PathLike, options?: {
171
176
encoding : BufferEncoding | null
172
177
withFileTypes ?: false | undefined
173
178
recursive ?: boolean | undefined
174
- } | BufferEncoding | null ) {
179
+ } | BufferEncoding | null ) : string [ ] {
175
180
return fs . readdirSync ( path , options )
176
181
}
177
182
/**
@@ -183,10 +188,23 @@ function writeFileByUTF8(filePath: PathLike, data:
183
188
return writeFileSync ( filePath , data , 'utf-8' )
184
189
}
185
190
191
+ /**
192
+ * 判断是否为Buffer类型
193
+ * @param data 输入数据
194
+ * @return boolean
195
+ */
186
196
function isBuffer ( data : object ) : boolean {
187
197
return Buffer . isBuffer ( data )
188
198
}
189
199
200
+ /**
201
+ * 创建目录
202
+ * @param path 目录路径
203
+ */
204
+ function mkdirSync ( path : PathLike ) : void {
205
+ fs . mkdirSync ( path )
206
+ }
207
+
190
208
/**
191
209
* 打印标准的Node开发环境信息
192
210
*/
@@ -269,6 +287,7 @@ export const VipNodeJS = {
269
287
readdirSync,
270
288
readFileToStrByUTF8,
271
289
writeFileByUTF8,
290
+ mkdirSync,
272
291
pathJoin,
273
292
pathResolve,
274
293
pathDirname,
You can’t perform that action at this time.
0 commit comments