Skip to content

[RFC] Allow to set a rootDir in untool #1155

@KnisterPeter

Description

@KnisterPeter

Current status

Right now untool deduces the rootDir from the found (from pwd and up) package.json.
From this process the configuration is loaded using cosmiconfig. This part is not overridable.

Problem

This behaviour is a bit too static.
The first issues arose during unit testing where we currently need to spawn the test in a separate process.
On a broader view this right now prevents integrating untool in a programatic way where the scope is not the current directory. E.g. initalize an untool instance as part of a program where the start-folder should not be the current directory.

Solution

It would be good to set the rootDir from outside and respect this during each and every initialize step (cosmiconfig, webpack, ...)

Additional Info

Moved from untool/untool#488

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions