GithubHelp home page GithubHelp logo

Simple suggestion on `list` about webbundle HOT 5 CLOSED

google avatar google commented on May 22, 2024
Simple suggestion on `list`

from webbundle.

Comments (5)

hayatoito avatar hayatoito commented on May 22, 2024 1

Thanks for the suggestion!

Yeah, the current format is very ah-hoc. We might want to make it more readable, I think.

However, I guess we don't want to make any guarantees about the stability of its output.
At present, it's for humans.

If other programs want to parse the output, I think we should provide more stable format, such as json, with CLI option such as --format=json or something like.

from webbundle.

hayatoito avatar hayatoito commented on May 22, 2024 1

Okay, as an experiment, I supported json format in 19d9e33.

% webbundle list --format=json my-todomvc.wbn | jq .

would output as follows:

{
  "version": [
    98,
    49,
    0,
    0
  ],
  "primary_url": "https://preact-todom.vc/",
  "manifest": "https://preact-todom.vc/",
  "exchanges": [
    {
      "request": {
        "uri": "https://preact-todom.vc/"
      },
      "response": {
        "status": 200,
        "body": {
          "size": 587
        }
      }
    },
    {
      "request": {
        "uri": "https://preact-todom.vc/app.js"
      },
      "response": {
        "status": 200,
        "body": {
          "size": 11810
        }
      }
    },
    {
      "request": {
        "uri": "https://preact-todom.vc/index.html"
      },
      "response": {
        "status": 301,
        "body": {
          "size": 0
        }
      }
    },
    {
      "request": {
        "uri": "https://preact-todom.vc/todomvc.css"
      },
      "response": {
        "status": 200,
        "body": {
          "size": 7027
        }
      }
    },
    {
      "request": {
        "uri": "https://preact-todom.vc/todomvc-common/base.js"
      },
      "response": {
        "status": 200,
        "body": {
          "size": 7253
        }
      }
    },
    {
      "request": {
        "uri": "https://preact-todom.vc/todomvc-common/base.css"
      },
      "response": {
        "status": 200,
        "body": {
          "size": 1818
        }
      }
    }
  ]
}

from webbundle.

lachlansneff avatar lachlansneff commented on May 22, 2024

Personally, disagree with putting commas in the byte size, could make it more difficult to parse.

from webbundle.

kination avatar kination commented on May 22, 2024

@lachlansneff thanks for suggestion 👍 ~it could be

from webbundle.

kination avatar kination commented on May 22, 2024

Seems good solution! I'll close this issue for now.

from webbundle.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.