Skip to content

Idea: automatically pick up the name of the package script #29

Open
@rauschma

Description

@rauschma

cross-os could automatically pick up the name of the package script (via process.env.npm_lifecycle_event):

{
  "scripts": {
    "user": "cross-os" // no argument!
  },
  "cross-os": {
    "user": {
      "darwin": "echo $USER",
      "win32": "echo %USERNAME%",
      "linux": "echo $USER"
    }
  },
  ···
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions