Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update package format #6

Open
pschmitt opened this issue Nov 30, 2021 · 0 comments
Open

Update package format #6

pschmitt opened this issue Nov 30, 2021 · 0 comments

Comments

@pschmitt
Copy link
Member

pschmitt commented Nov 30, 2021

There's a lot of legacy fields in the package.json files right now.
Most of the items in the root dir are ignored by zinit and are the result of an experiment that consisted in hosting zinit packages on npm.

Only ._resolved, .zsh-data.plugin-info[] and .zsh-data.zinit-ices[] are relevant.

Here's my first proposal draft:

{
    "author": "zdharma-continuum",
    "description": "Lorem ipsum bacon bacon",
    "name": "null",
    "message": "Thanks for trusting zdharma-continuum",
    "license": "MIT",
    "url": "https://github.com/zdharma-continuum/null",
    "version": "0.0.1",
    "requirements": [
        {
            "name": "Bin-Gem-Node",
            "type": "annex"
        },
        {
            "name": "cp",
            "type": "binary"
        }
    ],
    "profiles": {
        "default": {
            "message": "Installing default profile",
            "dl": "https://github.com/zdharma-continuum/null/null.tar.gz",
            "ices": {
                "null": true,
                "atclone": "echo 'installing'",
                "atpull": "echo 'updating'",
                "sbin": "null*",
                "make": "!",
                "run-atpull": true
            },
            "requirements": [
                {
                    "name": "test",
                    "type": "annex"
                }
            ]
        },
        "minimal": {
            "message": "Installing minimal profile",
            "plugin": "zdharma-continuum/null",
            "ices": {
                "atclone": "echo 'installing'",
                "atpull": "echo 'updating'",
                "run-atpull": "true"
            }
        }
    }
}

✨ Features:

  • Profile-specific plugin definition (zinit will fetch different repos depending of the selected profile)
  • Per-profile requirements
  • Per-profile messages
  • Clear distinction between regular and binary requirements (type prop)
  • _resolved get a more appropriate name download
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant