SplitScript.js
discordnpmgithub
  • 👋Welcome to SplitScript.js
  • 🍎core
    • root
    • cli
    • EventEmitter
    • Handling Errors
  • 🤖discord
    • getting started
    • create your first project
    • automod
    • bans
    • channels
    • commands
    • emojis
    • followups
    • types
  • 🌐https
    • usage
    • changelog
  • 🔗Links
    • Discord
    • NPM
    • GitHub
Powered by GitBook
On this page
  • set
  • get

Was this helpful?

Edit on GitHub
  1. core

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()
PreviousWelcome to SplitScript.jsNextcli

Last updated 1 year ago

Was this helpful?

🍎