{
  "$schema": "http://json-schema.org/schema",
  "$id": "UiMuiReactComponent",
  "title": "Create UI MUI React component library",
  "description": "Create a UI MUI React component Library for an Nx workspace.",
  "type": "object",
  "examples": [
    {
      "command": "nx g lib mylib --directory=myapp",
      "description": "Generate `libs/myapp/mylib`"
    },
    {
      "command": "nx g lib mylib --appProject=myapp",
      "description": "Generate a library with routes and add them to `myapp`"
    }
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Library name",
      "$default": {
        "$source": "argv",
        "index": 0
      },
      "x-prompt": "What name would you like to use for the library?",
      "pattern": "^[a-zA-Z].*$"
    },
    "directory": {
      "type": "string",
      "description": "A directory where the lib is placed.",
      "alias": "dir"
    },
    "style": {
      "description": "The file extension to be used for style files.",
      "type": "string",
      "default": "css",
      "alias": "s",
      "x-prompt": {
        "message": "Which stylesheet format would you like to use?",
        "type": "list",
        "items": [
          {
            "value": "css",
            "label": "CSS"
          },
          {
            "value": "scss",
            "label": "SASS(.scss)       [ http://sass-lang.com          ]"
          },
          {
            "value": "styl",
            "label": "Stylus(.styl)     [ http://stylus-lang.com        ]"
          },
          {
            "value": "less",
            "label": "LESS              [ http://lesscss.org            ]"
          },
          {
            "value": "styled-components",
            "label": "styled-components [ https://styled-components.com ]"
          },
          {
            "value": "@emotion/styled",
            "label": "emotion           [ https://emotion.sh            ]"
          },
          {
            "value": "styled-jsx",
            "label": "styled-jsx        [ https://www.npmjs.com/package/styled-jsx ]"
          },
          {
            "value": "none",
            "label": "None"
          }
        ]
      }
    },
    "designTokenProject": {
      "type": "string",
      "description": "The name of the design token project.",
      "alias": "p",
      "$default": {
        "$source": "projectName"
      },
      "x-prompt": "What is the name of the design token project?"
    },
    "withLocalToken": {
      "type": "boolean",
      "description": "Use @kuda-terbang/design-token-template as design-token",
      "default": true
    },
    "linter": {
      "description": "The tool to use for running lint checks.",
      "type": "string",
      "enum": [
        "eslint",
        "tslint"
      ],
      "default": "eslint"
    },
    "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."
    },
    "pascalCaseFiles": {
      "type": "boolean",
      "description": "Use pascal case component file name (e.g. `App.tsx`).",
      "alias": "P",
      "default": false
    },
    "routing": {
      "type": "boolean",
      "description": "Generate library with routes."
    },
    "appProject": {
      "type": "string",
      "description": "The application project to add the library route to.",
      "alias": "a"
    },
    "publishable": {
      "type": "boolean",
      "description": "Create a publishable library."
    },
    "buildable": {
      "type": "boolean",
      "default": false,
      "description": "Generate a buildable library."
    },
    "importPath": {
      "type": "string",
      "description": "The library name used to import it, like `@myorg/my-awesome-lib`."
    },
    "component": {
      "type": "boolean",
      "description": "Generate a default component.",
      "default": true
    },
    "js": {
      "type": "boolean",
      "description": "Generate JavaScript files rather than TypeScript files.",
      "default": false
    },
    "globalCss": {
      "type": "boolean",
      "description": "When `true`, the stylesheet is generated using global CSS instead of CSS modules (e.g. file is `*.css` rather than `*.module.css`).",
      "default": false
    },
    "strict": {
      "type": "boolean",
      "description": "Whether to enable tsconfig strict mode or not.",
      "default": true
    },
    "setParserOptionsProject": {
      "type": "boolean",
      "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
      "default": false
    },
    "standaloneConfig": {
      "description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
      "type": "boolean"
    },
    "compiler": {
      "type": "string",
      "enum": [
        "babel",
        "swc"
      ],
      "default": "babel",
      "description": "Which compiler to use."
    }
  },
  "required": [
    "name",
    "designTokenProject"
  ]
}
