@sanity-codegen/cli
Version:
CLI for sanity-codegen
1 lines • 3.59 kB
JSON
{"version":"1.0.0-alpha.13","commands":{"groq-codegen":{"id":"groq-codegen","description":"parses source code files for GROQ queries and outputs TypeScript types from them\n","pluginName":"@sanity-codegen/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"root":{"name":"root","type":"option","description":"Determines from where files are relative to. Defaults to where your\nsanity-codegen config was found (if any) or the current working\ndirectory.\n"},"configPath":{"name":"configPath","type":"option","description":"Optionally provide an exact path for the CLI to look for a\nsanity-codegen configuration file. If not provided, the CLI will walk up\nthe file system checking for `sanity-codegen.config.js` or\n`sanity-codegen.config.ts`.\n\nAny CLI flags passed with override the config options.\n"},"queryTypesOutputPath":{"name":"queryTypesOutputPath","type":"option","description":"Optionally provide a destination path to the resulting sanity groq\ntypes. The default value is `query-types.d.ts`.\n"},"schemaJsonInputPath":{"name":"schemaJsonInputPath","type":"option","description":"Optionally provide an input `schema-def.json` file to be used for GROQ\ncodegen. This is the `schemaJsonOutputPath` by default.\n"},"groqCodegenExclude":{"name":"groqCodegenExclude","type":"option","description":"Specify a glob or a list of globs to specify which source files you want\nto exclude from type generation.\n"}},"args":[{"name":"groqCodegenInclude","description":"Provide a glob to match source files you wish to parse for GROQ queries.\n"}]},"schema-codegen":{"id":"schema-codegen","description":"loads a sanity schema and generates TypeScript types from it\n","pluginName":"@sanity-codegen/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"configPath":{"name":"configPath","type":"option","description":"Optionally provide an exact path for the CLI to look for a\nsanity-codegen configuration file. If not provided, the CLI will walk up\nthe file system checking for `sanity-codegen.config.js` or\n`sanity-codegen.config.ts`.\n\nAny CLI flags passed with override the config options.\n"},"babelrcPath":{"name":"babelrcPath","type":"option","description":"Optionally provide a path to a .babelrc file. This will be passed into\nthe babel options of the schema executor.\n\n`babelOptions` takes precedence over `babelrcPath`\n"},"babelOptions":{"name":"babelOptions","type":"option","description":"Optionally provide babel options inline in a JSON blob. This will be\npassed into the babel options of the schema executor.\n\n`babelOptions` takes precedence over `babelrcPath`\n"},"root":{"name":"root","type":"option","description":"Determines from where files are relative to. Defaults to where your\nsanity-codegen config was found (if any) or the current working\ndirectory.\n"},"schemaTypesOutputPath":{"name":"schemaTypesOutputPath","type":"option","description":"Optionally provide a destination path to the resulting sanity schema\ntypes. The default value is ./schema-types.d.ts.\n"},"schemaJsonOutputPath":{"name":"schemaJsonOutputPath","type":"option","description":"Optionally provide a destination path to the resulting sanity schema\nJSON. The default value is ./schema-def.json.\n"}},"args":[{"name":"schemaPath","description":"Optionally provide the path to your sanity schema entry point. If not\nprovided, the CLI will try to get this value from your sanity.json file.\n"}]}}}