Consider adding a "minifier"/"compiler"-like option to libjsonnet

Open
#1,044 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Domain
compilers, tooling

Research direction

Start by reviewing libjsonnet and the existing tooling to understand how imports, static analysis, and evaluation are currently handled. Clarify the desired output format and comment/configuration behavior before implementation. Done would mean a defined, tested way to produce one resolved Jsonnet text file without evaluating it.

Written by the indexing model from the issue text.

Description

I have a usecase in which I would love to have an equivalent to a javascript "minifier".

That is, a tool which reads a jsonnet file, resolves imports, performs static analysis etc, but instead of then evaluating the jsonnet, it simply returns a string of text that contains all the jsonnet input, in a single file (optionally without comments, and other configuration).

I don't see a way of currently doing this with the existing tooling, but it seems like it should be relatively accomplishable given what's already present.

Dominant language
Jsonnet
Stars
7.6k
Forks
475
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

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 google/jsonnet

All issues in google/jsonnet

Similar issues

More Compilers issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.