initial
This commit is contained in:
32
ts/index.ts
Normal file
32
ts/index.ts
Normal 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
7
ts/smartshell.plugins.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import * as shelljs from 'shelljs'
|
||||
import * as smartq from 'smartq'
|
||||
|
||||
export {
|
||||
shelljs,
|
||||
smartq
|
||||
}
|
Reference in New Issue
Block a user