0.0.35 • Published 3 years ago

@folkforms/dev-info v0.0.35

Weekly downloads
-
License
MIT
Repository
-
Last release
3 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

3 years ago

0.0.32

3 years ago

0.0.33

3 years ago

0.0.34

3 years ago

0.0.35

3 years ago

0.0.30

4 years ago

0.0.28

4 years ago

0.0.29

4 years ago

0.0.20

4 years ago

0.0.21

4 years ago

0.0.22

4 years ago

0.0.23

4 years ago

0.0.24

4 years ago

0.0.25

4 years ago

0.0.19

4 years ago

0.0.26

4 years ago

0.0.27

4 years ago

0.0.16

4 years ago

0.0.17

4 years ago

0.0.18

4 years ago

0.0.10

4 years ago

0.0.11

4 years ago

0.0.12

4 years ago

0.0.13

4 years ago

0.0.14

4 years ago

0.0.15

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.1

4 years ago

0.0.2

4 years ago