{
  "$schema": "http://json-schema.org/schema",
  "$id": "NativeScriptNxApp",
  "title": "Create a NativeScript Application for Nx",
  "examples": [
    {
      "command": "g app apps/nested/myapp",
      "description": "Generate myapp app under apps/nested/myapp folder"
    }
  ],
  "type": "object",
  "properties": {
    "directory": {
      "type": "string",
      "description": "A directory where the application is placed",
      "$default": {
        "$source": "argv",
        "index": 0
      },
      "alias": "d",
      "x-prompt": "What directory would you like to use for the application? (full path - eg. apps/my-lib)"
    },
    "name": {
      "type": "string",
      "description": "The name of the application.",
      "alias": "n"
    },
    "framework": {
      "description": "The frontend framework to use.",
      "type": "string",
      "default": "angular",
      "x-prompt": {
        "message": "What frontend framework would you like to use with this NativeScript app?",
        "type": "list",
        "items": [
          {
            "value": "angular",
            "label": "Angular  [ https://angular.io   ]"
          },
          {
            "value": "vanilla",
            "label": "Vanilla (.xml view files)"
          }
        ]
      }
    },
    "routing": {
      "type": "boolean",
      "description": "Use root routing module.",
      "default": true
    },
    "groupByName": {
      "description": "Group by app name (baseName-platform) instead of the default (platform-baseName)",
      "type": "boolean",
      "default": false
    },
    "skipFormat": {
      "description": "Skip formatting files",
      "type": "boolean",
      "default": false
    },
    "unitTestRunner": {
      "type": "string",
      "enum": ["jest", "none"],
      "description": "Test runner to use for unit tests",
      "default": "jest"
    },
    "tags": {
      "type": "string",
      "description": "Add tags to the application (used for linting)",
      "alias": "t"
    },
    "linter": {
      "description": "The tool to use for running lint checks.",
      "type": "string",
      "enum": ["eslint", "none"],
      "default": "eslint"
    }
  },
  "required": ["directory"]
}
