[Feature Request] Watch mode for type generation

Open
#925 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
57/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript

Research direction

Start by tracing the varlock run and varlock codegen command entry points and how they generate typings from .env.schema. Check whether either command already watches files or has related tests. Done means a proposed watch mode continuously regenerates typings after .env.schema changes; the issue does not specify which command should provide it.

Written by the indexing model from the issue text.

Description

enhancement
Description

A long-running command that continuously re-generates the typings for the env schema upon change.

Motivation

I am developing a CLI app, which does not have "dev server", instead I run tsc --watch, which helps me debug stuff live (apart from the LSP).

When I edit the .env.schema, these changes are not reflected though, when running

varlock run -- tsc --watch
Proposed Solution

varlock run --watch or varlock codegen --watch

Alternatives

Re-running the "dev" command every time .env.schema has changed.

Additional Information

No response

Dominant language
TypeScript
Stars
4.9k
Forks
140
Avg merge
2d 3h
Merged PRs (30d)
35

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dmno-dev/varlock

All issues in dmno-dev/varlock

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.