node-cooper-config - v0.2.0
    Preparing search index...

    Function projectRoot

    • The project root: the directory of the nearest package.json found walking up from cwd, else cwd itself.

      The nearest package.json rather than the working directory, so a program started from a subdirectory (a script in bin/, a test runner in a workspace package) still finds its own config/. The fallback keeps a script with no package.json at all working, the way the references read config/config.casc from the working directory.

      Parameters

      • Optionalcwd: string = ...

        where to start (default process.cwd())

      Returns string

      an absolute path