go-default

command module
v0.0.0-...-fe2e314 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2024 License: MIT Imports: 7 Imported by: 0

README

go-default

CLI tool for update default values of each input in .vscode/tasks.json.

Demo

https://github.com/user-attachments/assets/ac3f25ea-6aee-465d-9d2c-8eb7ce69f806

Usage

Usage: default --target-folder /PATH/TO/PROJECT/FOLDER --set id1=value1 ... idN=valueN [--backup-file /PATH/TO/tasks.json.bak]

Options:
  --target-folder /PATH/TO/PROJECT/FOLDER, -t /PATH/TO/PROJECT/FOLDER
                         target path of folder containing '.vscode/tasks.json'
  --set id1=value1 ... idN=valueN, -s id1=value1 ... idN=valueN
                         pairs of id and default values to update
  --backup-file /PATH/TO/tasks.json.bak, -b /PATH/TO/tasks.json.bak
                         path of backup file of '.vscode/tasks.json'

See sample

Background and motivation

The value of default property of the each element of inputs in tasks.json is fixed.

Many developers want to remenber the value from user input, then some similar issues were filed and closed.

This tool might be an approach of the solution for these issues.

Limitation

Currently, this tool only UPDATE the value of default property of the element of inputs.
This means this tool doesn't create the default property when the element doesn't have the property as following.

  "version": "2.0.0",
  "tasks": [
    // ...
  ],
  "inputs": [
    {
      "id": "input1",
      "description": "...",
      "type": "promptString",
      // ...
    }
  ]

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL