{
  "$schema": "http://json-schema.org/schema",
  "id": "NxNestLibrary",
  "title": "Create a Nest Library for Nx",
  "type": "object",
  "examples": [
    {
      "command": "g lib mylib --directory=myapp",
      "description": "Generate libs/myapp/mylib"
    }
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Library name",
      "$default": {
        "$source": "argv",
        "index": 0
      },
      "x-prompt": "What name would you like to use for the library?"
    },
    "directory": {
      "type": "string",
      "description": "A directory where the app is placed",
      "alias": "d"
    },
    "linter": {
      "description": "The tool to use for running lint checks.",
      "type": "string",
      "enum": ["eslint", "tslint"],
      "default": "tslint"
    },
    "unitTestRunner": {
      "type": "string",
      "enum": ["jest", "none"],
      "description": "Test runner to use for unit tests",
      "default": "jest"
    },
    "tags": {
      "type": "string",
      "description": "Add tags to the library (used for linting)",
      "alias": "t"
    },
    "skipFormat": {
      "description": "Skip formatting files",
      "type": "boolean",
      "default": false
    },
    "skipTsConfig": {
      "type": "boolean",
      "default": false,
      "description": "Do not update tsconfig.json for development experience."
    },
    "publishable": {
      "type": "boolean",
      "description": "Create a buildable library.",
      "alias": "buildable"
    },
    "global": {
      "type": "boolean",
      "description": "Add the Global decorator to the generated module.",
      "default": false
    },
    "service": {
      "type": "boolean",
      "description": "Include a service with the library.",
      "default": false
    },
    "controller": {
      "type": "boolean",
      "description": "Include a controller with the library",
      "default": false
    },
    "testEnvironment": {
      "type": "string",
      "enum": ["jsdom", "node"],
      "description": "The test environment for jest, for node applications this should stay as node unless doing DOM testing.",
      "default": "node"
    },
    "target": {
      "type": "string",
      "description": "The es target, Nest suggest using es6 or higher.",
      "default": "es6",
      "enum": [
        "es5",
        "es6",
        "esnext",
        "es2015",
        "es2016",
        "es2017",
        "es2018",
        "es2019",
        "es2020"
      ]
    }
  },
  "required": ["name"]
}
