This commit is contained in:
2017-02-12 13:13:08 +01:00
commit 26ed390ba6
6 changed files with 109 additions and 0 deletions

32
ts/index.ts Normal file
View File

@ -0,0 +1,32 @@
import * as plugins from './smartshell.plugins'
export interface IExecResult {
exitCode: number,
consoleOutput: string
}
export let exec = (commandStringArg: string): Promise<IExecResult> => {
let done = plugins.smartq.defer<IExecResult>()
plugins.shelljs.exec(commandStringArg,{async: true}, (code, stdout, stderr) => {
})
return done.promise
}
export let execSilent = (commandStringArg: string) => {
let done = plugins.smartq.defer<IExecResult>()
plugins.shelljs.exec(commandStringArg,{}, () => {
})
return done.promise
}
export let execSync = () => {
}
export let execSyncSilent = () => {
}

7
ts/smartshell.plugins.ts Normal file
View File

@ -0,0 +1,7 @@
import * as shelljs from 'shelljs'
import * as smartq from 'smartq'
export {
shelljs,
smartq
}