Skip to content

[Feature request] Supports read WIREIT_LOGGER from package.json #1343

@gin-lsl

Description

@gin-lsl

TLDR: Can we support reading WIREIT_LOGGER from package.json#config? For example:

{
  "config": {
    "WIREIT_LOGGER": "simple"
  }
}

Context:

We use wireit in a large monorepo and it helps a lot. One issue:

We have many scripts in package.json, and many need logging. To get correct output, we need WIREIT_LOGGER=simple.

I know we can add it to .zshrc or similar, but we have many developers, including temporary contributors. I don't want to repeatedly explain why and how.

Current workaround:

{
  "scripts": {
    "foo": "WIREIT_LOGGER=simple npm run foo:wireit",
    "foo:wireit": "wireit"
  },
  "wireit": {
    "foo:wireit": {
      "command": "do something"
    }
  }
}

To run foo, we add an extra foo:wireit. This worked initially, but as scripts grew, it added clutter. Reading from config would be ideal.

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