smartopen/ts/index.ts
2019-06-04 11:25:51 +02:00

14 lines
280 B
TypeScript

import open from 'opn';
import { ChildProcess } from 'child_process';
export let openUrl = async urlArg => {
if (!(process.env.CI === 'true')) {
const childProcess = await open(urlArg, {
wait: false
});
return childProcess;
} else {
return null;
}
};