import * as fs from "fs" ; import * as path from "path" ; import { MODULES_ROOT } from "../constants" ; param props . cwd param props . modulePath param props . relativePath param props . absoluatePath export function getPluginPath ( props ) { const { cwd , modulePath = null , relativePath = null , absolutePath = null , } = props ; if ( modulePath ) { return path . join ( cwd , MODULES_ROOT , modulePath ) ; } if ( relativePath ) { return path . join ( cwd , relativePath ) ; } if ( absolutePath ) { return absolutePath ; } throw new Error ( "Codotype Plugin path is invalid - please check Codotype.registerPlugin() parameters" ) ; }