0.0.35 • Published 2 years ago

@folkforms/dev-info v0.0.35

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

dev-info

Used to provide help text or index all the things you need to remember in a new job. You have a single JSON file containing all the info, as opposed to having dozens of text files everywhere.

  1. Install dev-info globally: yarn add --global dev-info
  2. Create ~/.dev-info.json
{
  "data": {
    "frontend": {
      "run": {
        "_description": "The frontend uses yarn. Use 'yarn start' to run it.",
        "_executable: "yarn start"
      },
      "tests": {
        "_description": "Description of the frontend tests. Use 'yarn test' to run the tests.",
        "_executable: "yarn test"
      },
      "deploy": {
        "_duplicate": "misc deploy"
      }
    },
    "backend": {
      "build": {
        "_description": "The backend uses maven.",
        "_executable: "mvn compile"
      },
      "run": {
        "_description": "Run StartServer.jar to run the backend.",
        "_executable: "java -jar StartServer.jar"
      },
      "tests": {
        "_description": "Description of the backend tests.",
        "_executable: "mvn clean verify"
      },
      "deploy": {
        "_duplicate": "misc deploy"
      }
    },
    "misc": {
      "deploy": {
        "_description": "How to deploy stuff"
      }
    }
  },
  "paramOverrides": {
    "foo-project": {
      "appRoot": "overridden-app-root",
      "staticRoute": "overridden-static-root",
      "zkGroup": "overridden-zk-group"
    }
  },
  "projectDomains": {
    "domain-one.com": [
      "foo-project",
      "bar-project"
    ],
    "domain-two.com": [
      "muk-project"
    ]
  },
  "projectNotes": {
    "foo-project": {
      "frontend": {
        "run": {
          "_note": "This note only appears for 'frontend run' inside foo-project"
        }
      }
    },
    "bar-project": {
      "frontend": {
        "run": {
          "_note": "This note only appears for 'frontend run' inside bar-project"
        }
      }
    }
  },
}
  1. Type dev for a list of topics
frontend
    run
    tests
backend
    build
    run
    tests
  1. Type dev frontend run for detail
The frontend uses yarn.

Executable: yarn start
  1. Use the -x argument to execute a command. For example, dev frontend run -x will execute whatever is in the _executable field, in this case yarn start.

Data options

  • _description: Text that describes the given topic
  • _executable: An executable command that will be run when the -x option is specified
  • _duplicate: Link this entry to another entry
  • _file: Use the given file's contents as the description (and optionally executable as well)

_file options

Files loaded via the _file option can denote executables in the following two forms:

    ## Executable

    foo

or

    Executable: foo

Parameters

Most of the parameters are based on values taken from the HubSpot project yaml configuration name i.e. "hubspot.deploy/my-project.yaml".

You can override parameters using projectParamsMap.param if it's not getting the correct value.

The ${domain} param will be mapped to a value from projectDomains. For example:

    "projectDomains": {
      "foo-domain": [ "foo-project-a", "foo-project-b" ],
      "bar-domain": [ "bar-project-a", "bar-project-b" ]
    }

Overriding parameters

"paramOverrides": { "foo-project": { "appRoot": "overridden-app-root", "staticRoute": "overridden-static-root", "zkGroup": "overridden-zk-group" } },

0.0.31

2 years ago

0.0.32

2 years ago

0.0.33

2 years ago

0.0.34

2 years ago

0.0.35

2 years ago

0.0.30

2 years ago

0.0.28

2 years ago

0.0.29

2 years ago

0.0.20

3 years ago

0.0.21

3 years ago

0.0.22

3 years ago

0.0.23

3 years ago

0.0.24

3 years ago

0.0.25

2 years ago

0.0.19

3 years ago

0.0.26

2 years ago

0.0.27

2 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.18

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.15

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.1

3 years ago

0.0.2

3 years ago