UNPKG

xsandra

Version:
11 lines (8 loc) 281 B
const path = require('path') const name = require(path.join(process.cwd(),'package.json')) const file = require(path.join(process.cwd(),name.entryScript)) try{ file() }catch(error){ throw new Error('Unable to resolve script\nScript must export a function\n') }