Skip to content

Commit 8a8f718

Browse files
committed
Change file name to kebab-case from CamelCase.
1 parent 4482f88 commit 8a8f718

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

src/code.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ export function rewriteImportToRequire(code: string): string {
88
return code.replace(importStatement, (str, wildcard: string, module: string, modules: string, from: string) => {
99
let rewrite = '';
1010

11-
// 导入所有
1211
if (module)
1312
rewrite += `${rewrite === '' ? '' : ', '}default: ${module} `;
14-
// 解构导入
13+
1514
if (modules)
1615
rewrite += `${rewrite === '' ? '' : ', '}${modules
1716
.split(',')
@@ -31,10 +30,10 @@ export function rewriteModulePathInRequire(code: string, basePath: string, fileP
3130
return code.replace(requireStatement, (str, par, name) => {
3231
let path = Path.join(basePath, 'node_modules', name);
3332

34-
if (Fs.existsSync(path) === false) // 不是第三方模块
35-
path = (name.indexOf('/') === -1) // 是否标准模块
33+
if (Fs.existsSync(path) === false)
34+
path = (name.indexOf('/') === -1)
3635
? name
37-
: (filePath) // 文件路径是否存在
36+
: (filePath)
3837
? Path.join(Path.dirname(filePath), name)
3938
: Path.join(basePath, name);
4039

File renamed without changes.

src/extension.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
Disposable,
1313
} from 'vscode';
1414

15-
import ReplClient from './ReplClient';
15+
import ReplClient from './repl-client';
1616

1717

1818
let outputWindow = window.createOutputChannel("NodeJs REPL");
@@ -82,7 +82,7 @@ export function deactivate() {
8282
client.dispose();
8383
editor = null;
8484
doc = null;
85-
85+
8686
for (let cmd of registeredCommands)
8787
cmd.dispose();
8888
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
rewriteChainCallInOneLine
1616
} from "./code";
1717

18-
import Decorator from "./Decorator";
18+
import Decorator from "./decorator";
1919
import { spawn, ChildProcess } from "child_process";
2020

2121

File renamed without changes.

0 commit comments

Comments
 (0)