import { BaseCommand } from "../../common" ; import { verbatimOutput } from "../../utils" ; import * as vscode from "vscode" ; import { render } from "rmarkdown-helper" ; export class Knit extends BaseCommand { private _outputChannel ! : vscode . OutputChannel ; private _fullpath ? : string ; init ( ) { this . _outputChannel = vscode . window . createOutputChannel ( "Knit" ) ; this . _fullpath = vscode . window . activeTextEditor ! . document . fileName ; } public async run ( ) { this . _outputChannel . show ( ) ; let p = render ( this . _fullpath ) ; verbatimOutput ( p , this . _outputChannel ) ; } }