Skip to content

Commit

Permalink
feat(exposed): adds silent
Browse files Browse the repository at this point in the history
  • Loading branch information
rafamel committed Apr 26, 2019
1 parent 5061443 commit 312c676
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/exposed/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { default as options } from './options';
export { default as series } from './series';
export { default as silent } from './silent';
export { default as line } from './line';
14 changes: 14 additions & 0 deletions src/exposed/silent.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { TScript } from '~/types';
import core from '~/core';
import logger from '~/utils/logger';

// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
export default function silent(script: TScript) {
return async function silent(args?: string[]): Promise<void> {
try {
await core.run(script, args || []);
} catch (err) {
logger.error(err);
}
};
}

0 comments on commit 312c676

Please sign in to comment.