@tarojs/cli

  • Version 3.6.27
  • Published
  • 401 kB
  • 21 dependencies
  • MIT license

Install

npm i @tarojs/cli
yarn add @tarojs/cli
pnpm add @tarojs/cli

Overview

cli tool for taro

Index

Variables

variable _default

const _default: {
doctor: { validators: ((args: any) => any)[] };
Project: typeof Project;
Creator: typeof Creator;
defineConfig: typeof defineConfig;
getRootPath: typeof getRootPath;
};

    variable doctor

    const doctor: { validators: ((args: any) => any)[] };

      Functions

      function defineConfig

      defineConfig: (config: UserConfigExport) => UserConfigExport;
      • v3.6.9 暂不支持 react native

      function getRootPath

      getRootPath: () => string;

        Classes

        class Creator

        class Creator {}

          constructor

          constructor(sourceRoot?: string);

            property rootPath

            rootPath: string;

              method init

              init: () => void;

                method sourceRoot

                sourceRoot: (rootPath?: string) => string;

                  method templatePath

                  templatePath: (...args: string[]) => string;

                    method write

                    write: () => void;

                      class Project

                      class Project extends Creator {}

                        constructor

                        constructor(options: IProjectConfOptions);

                          property askCompiler

                          askCompiler: AskMethods;

                            property askCSS

                            askCSS: AskMethods;

                              property askDescription

                              askDescription: AskMethods;

                                property askFramework

                                askFramework: AskMethods;

                                  property askNpm

                                  askNpm: AskMethods;

                                    property askProjectName

                                    askProjectName: AskMethods;

                                      property askTemplate

                                      askTemplate: AskMethods;

                                        property askTemplateSource

                                        askTemplateSource: AskMethods;

                                          property askTypescript

                                          askTypescript: AskMethods;

                                            property conf

                                            conf: IProjectConfOptions;

                                              property rootPath

                                              rootPath: string;

                                                method ask

                                                ask: () => Promise<{
                                                projectName: string;
                                                projectDir: string;
                                                npm: NpmType;
                                                templateSource: string;
                                                clone?: boolean | undefined;
                                                template: string;
                                                description?: string | undefined;
                                                typescript?: boolean | undefined;
                                                css: CSSType;
                                                date?: string | undefined;
                                                src?: string | undefined;
                                                sourceRoot?: string | undefined;
                                                env?: string | undefined;
                                                autoInstall?: boolean | undefined;
                                                framework: FrameworkType;
                                                compiler?: CompilerType | undefined;
                                                }>;

                                                  method create

                                                  create: () => Promise<void>;

                                                    method fetchTemplates

                                                    fetchTemplates: (answers: IProjectConf) => Promise<ITemplates[]>;

                                                      method init

                                                      init: () => void;

                                                        method write

                                                        write: (cb?: () => void) => void;

                                                          Interfaces

                                                          interface ConfigEnv

                                                          interface ConfigEnv {}

                                                            property command

                                                            command: string;
                                                            • taro 当前执行的命令

                                                            property mode

                                                            mode: string;
                                                            • 当前模式 (mode)

                                                            Type Aliases

                                                            type UserConfigExport

                                                            type UserConfigExport = IProjectConfig | Promise<IProjectConfig> | UserConfigFn;

                                                              type UserConfigFn

                                                              type UserConfigFn = (
                                                              merge: WebpackMerge,
                                                              env: ConfigEnv
                                                              ) => IProjectConfig | Promise<IProjectConfig>;

                                                                Namespaces

                                                                namespace @tarojs/components

                                                                module '@tarojs/components' {}

                                                                  namespace *.css

                                                                  module '*.css' {}

                                                                    namespace *.gif

                                                                    module '*.gif' {}

                                                                      namespace *.jpeg

                                                                      module '*.jpeg' {}

                                                                        namespace *.jpg

                                                                        module '*.jpg' {}

                                                                          namespace *.json

                                                                          module '*.json' {}

                                                                            variable value

                                                                            const value: any;

                                                                              namespace *.less

                                                                              module '*.less' {}

                                                                                namespace *.png

                                                                                module '*.png' {}

                                                                                  namespace *.sass

                                                                                  module '*.sass' {}

                                                                                    namespace *.scss

                                                                                    module '*.scss' {}

                                                                                      namespace *.styl

                                                                                      module '*.styl' {}

                                                                                        namespace *.svg

                                                                                        module '*.svg' {}

                                                                                          Package Files (8)

                                                                                          Dependencies (21)

                                                                                          Dev Dependencies (7)

                                                                                          Peer Dependencies (0)

                                                                                          No peer dependencies.

                                                                                          Badge

                                                                                          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@tarojs/cli.

                                                                                          • Markdown
                                                                                            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@tarojs/cli)
                                                                                          • HTML
                                                                                            <a href="https://www.jsdocs.io/package/@tarojs/cli"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>