Skip to content

Commit 43bf8b4

Browse files
committed
removed changeFile for WikiConsoleRunner
1 parent be0e5c4 commit 43bf8b4

5 files changed

Lines changed: 3 additions & 62 deletions

File tree

runners/wikiConsole/index.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,6 @@ export class WikiConsole extends WikiRunner {
8585
}
8686

8787

88-
runCreateFile(runCommand: RunCommand): RunResult{
89-
let fileName = path.basename(runCommand.command.parameters[0]);
90-
let filePath = path.join(runCommand.command.parameters[0].replace(fileName, ""));
91-
let fileType = this.fileTypeMap.get(fileName.substr(fileName.indexOf(".")));
92-
let commandContent, content = undefined;
93-
if(runCommand.command.parameters[1]){
94-
content = fs.readFileSync(path.join(this.playbookPath, runCommand.command.parameters[1]), { encoding: "utf-8" });
95-
commandContent = content.replace(/\r?\n|\r/g, " `\n");
96-
}
97-
this.renderWiki(path.join(this.getRunnerDirectory(), "templates", "createFile.asciidoc"), {filePath : filePath , content: content, fileName: fileName, fileType: fileType, commandContent: commandContent });
98-
return null;
99-
}
100-
10188
runDownloadFile(runCommand: RunCommand): RunResult{
10289
let url = runCommand.command.parameters[0];
10390
let fileName = runCommand.command.parameters[1];

runners/wikiConsole/templates/createFile.asciidoc

Lines changed: 0 additions & 43 deletions
This file was deleted.

runners/wikiEclipse/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ export class WikiEclipse extends WikiRunner {
1616
}
1717

1818
runCreateFile(runCommand: RunCommand): RunResult{
19-
let workspacePath = this.getVariable(this.workspaceDirectory);
2019
let fileName = path.basename(runCommand.command.parameters[0]);
21-
let filePath = path.join(workspacePath, runCommand.command.parameters[0].replace(fileName, ""));
20+
let filePath = path.join(this.getVariable(this.workspaceDirectory), runCommand.command.parameters[0].replace(fileName, ""));
2221
filePath = path.relative(this.getWorkingDirectory(), filePath).replace(/\\/g, "/");
2322
let fileType = this.fileTypeMap.get(fileName.substr(fileName.indexOf(".")));
2423
let parentFolder = path.basename(filePath);

runners/wikiEditor/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ export class WikiEditor extends WikiRunner {
1717

1818

1919
runCreateFile(runCommand: RunCommand): RunResult{
20-
let workspacePath = this.getVariable(this.workspaceDirectory);
2120
let fileName = path.basename(runCommand.command.parameters[0]);
22-
let filePath = path.join(workspacePath, runCommand.command.parameters[0].replace(fileName, ""));
21+
let filePath = path.join(this.getVariable(this.workspaceDirectory), runCommand.command.parameters[0].replace(fileName, ""));
2322
filePath = path.relative(this.getWorkingDirectory(), filePath).replace(/\\/g, "/");
2423
let fileType = this.fileTypeMap.get(fileName.substr(fileName.indexOf(".")));
2524
let content = runCommand.command.parameters[1]

runners/wikiVsCode/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ export class WikiVsCode extends WikiRunner {
1616

1717

1818
runCreateFile(runCommand: RunCommand): RunResult{
19-
let workspacePath = this.getVariable(this.workspaceDirectory);
2019
let fileName = path.basename(runCommand.command.parameters[0]);
21-
let filePath = path.join(workspacePath, runCommand.command.parameters[0].replace(fileName, ""));
20+
let filePath = path.join(this.getVariable(this.workspaceDirectory);, runCommand.command.parameters[0].replace(fileName, ""));
2221
filePath = path.relative(this.getWorkingDirectory(), filePath).replace(/\\/g, "/");
2322
let fileType = this.fileTypeMap.get(fileName.substr(fileName.indexOf(".")));
2423
let content = runCommand.command.parameters[1]

0 commit comments

Comments
 (0)