Skip to content

Latest commit

 

History

History
27 lines (15 loc) · 477 Bytes

File metadata and controls

27 lines (15 loc) · 477 Bytes

root

Set and get the project root

This overwrites the actual.require.main.filename - might not work when using something like PM2

set

You can set the project root by calling root with the dir parameter

import {root} from '@splitscript.js/core'

root('C:\\Path\\To\\Project')

get

You can get the project root by calling root without any parameters

import {root} from '@splitscript.js/core'

const projectRoot = root()