Skip to content

Repository files navigation

GitHub package.json version npm bundle size GitHub Workflow Status NPM

lup-root

Node module that determines absolute path to project root and main file of project

Example

import { APPLICATION_ROOT, MAIN, ROOT, SCRIPT_MAIN, SCRIPT_ROOT } from "lup-root";

// Absolute path to the main file of the application (not the script that is currently running).
console.log('Main file: ' + MAIN);,

// Absolute path to the root directory of the application (never ends with '/' or '\\').
console.log("Root directory: " + ROOT);

// Absolute path to the root directory of the application (never ends with '/' or '\\').
console.log("Application root: " + APPLICATION_ROOT);

// Absolute path to the main file of the script that is currently running and that got initially invoked.
console.log("Script main: " + SCRIPT_MAIN);

// Absolute path to the root directory of the script that is currently running and that got initially invoked (never ends with '/' or '\\').
console.log("Script root: " + SCRIPT_ROOT);

About

Node module determines path to project root

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages