@tarojs/cli

  • Version 3.4.9
  • Published
  • 564 kB
  • 38 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: {
Convertor: typeof Convertor;
doctor: {
validators: (
| (({
configPath,
projectConfig,
}: {
configPath: any;
projectConfig: any;
}) => Promise<{ desc: string; lines: any }>)
| (({
appPath,
}: {
appPath: any;
}) => Promise<{ desc: string; lines: ErrorLine[] }>)
| (({
projectConfig,
}: {
projectConfig: any;
}) => Promise<{ desc: string; raw: any }>)
)[];
};
Project: typeof Project;
};

    variable doctor

    const doctor: {
    validators: (
    | (({
    configPath,
    projectConfig,
    }: {
    configPath: any;
    projectConfig: any;
    }) => Promise<{ desc: string; lines: any }>)
    | (({
    appPath,
    }: {
    appPath: any;
    }) => Promise<{ desc: string; lines: ErrorLine[] }>)
    | (({
    projectConfig,
    }: {
    projectConfig: any;
    }) => Promise<{ desc: string; raw: any }>)
    )[];
    };

      Classes

      class Convertor

      class Convertor {}

        constructor

        constructor(root: any);

          property components

          components: Set<IComponent>;

            property convertDir

            convertDir: string;

              property convertRoot

              convertRoot: string;

                property entryJSON

                entryJSON: any;

                  property entryJSONPath

                  entryJSONPath: string;

                    property entryJSPath

                    entryJSPath: string;

                      property entryStyle

                      entryStyle: string;

                        property entryStylePath

                        entryStylePath: string;

                          property entryUsingComponents

                          entryUsingComponents: Record<string, string>;

                            property fileTypes

                            fileTypes: any;

                              property framework

                              framework: 'react' | 'vue';

                                property hadBeenBuiltComponents

                                hadBeenBuiltComponents: Set<string>;

                                  property hadBeenBuiltImports

                                  hadBeenBuiltImports: Set<string>;

                                    property hadBeenCopyedFiles

                                    hadBeenCopyedFiles: Set<string>;

                                      property importsDir

                                      importsDir: string;

                                        property pages

                                        pages: Set<string>;

                                          property root

                                          root: string;

                                            property wxsIncrementId

                                            wxsIncrementId: () => string;

                                              method copyFileToTaro

                                              copyFileToTaro: (from: string, to: string, options?: fs.CopyOptionsSync) => any;

                                                method generateConfigFiles

                                                generateConfigFiles: () => void;

                                                  method generateCustomTabbar

                                                  generateCustomTabbar: (tabBar: TabBar) => void;

                                                    method generateEntry

                                                    generateEntry: () => void;

                                                      method generateScriptFiles

                                                      generateScriptFiles: (files: Set<string>) => void;

                                                        method generateShowPath

                                                        generateShowPath: (filePath: string) => string;

                                                          method generateTabBarIcon

                                                          generateTabBarIcon: (tabBar: TabBar) => void;

                                                            method getApp

                                                            getApp: () => void;

                                                              method getConfigFilePath

                                                              getConfigFilePath: (src: string) => any;

                                                                method getDistFilePath

                                                                getDistFilePath: (src: string, extname?: string) => string;

                                                                  method getPages

                                                                  getPages: () => void;

                                                                    method getSitemapLocation

                                                                    getSitemapLocation: () => void;

                                                                      method getSubPackages

                                                                      getSubPackages: () => void;

                                                                        method init

                                                                        init: () => void;

                                                                          method initConvert

                                                                          initConvert: () => void;

                                                                            method parseAst

                                                                            parseAst: ({
                                                                            ast,
                                                                            sourceFilePath,
                                                                            outputFilePath,
                                                                            importStylePath,
                                                                            depComponents,
                                                                            imports,
                                                                            }: IParseAstOptions) => { ast: t.File; scriptFiles: Set<string> };

                                                                              method processStyleAssets

                                                                              processStyleAssets: (
                                                                              content: string,
                                                                              stylePath: string,
                                                                              styleDist: string
                                                                              ) => void;

                                                                                method run

                                                                                run: () => void;

                                                                                  method showLog

                                                                                  showLog: () => void;

                                                                                    method styleUnitTransform

                                                                                    styleUnitTransform: (filePath: string, content: string) => Promise<any>;

                                                                                      method traverseComponents

                                                                                      traverseComponents: (components: Set<IComponent>) => void;

                                                                                        method traversePages

                                                                                        traversePages: () => void;

                                                                                          method traverseStyle

                                                                                          traverseStyle: (filePath: string, style: string) => Promise<void>;

                                                                                            method writeFileToConfig

                                                                                            writeFileToConfig: (src: string, json?: string) => void;

                                                                                              method writeFileToTaro

                                                                                              writeFileToTaro: (dist: string, code: string) => void;

                                                                                                class Project

                                                                                                class Project extends Creator {}

                                                                                                  constructor

                                                                                                  constructor(options: IProjectConf);

                                                                                                    property askCSS

                                                                                                    askCSS: AskMethods;

                                                                                                      property askDescription

                                                                                                      askDescription: AskMethods;

                                                                                                        property askFramework

                                                                                                        askFramework: AskMethods;

                                                                                                          property askProjectName

                                                                                                          askProjectName: AskMethods;

                                                                                                            property askTemplate

                                                                                                            askTemplate: AskMethods;

                                                                                                              property askTemplateSource

                                                                                                              askTemplateSource: AskMethods;

                                                                                                                property askTypescript

                                                                                                                askTypescript: AskMethods;

                                                                                                                  property conf

                                                                                                                  conf: IProjectConf;

                                                                                                                    property rootPath

                                                                                                                    rootPath: string;

                                                                                                                      method ask

                                                                                                                      ask: () => Promise<any>;

                                                                                                                        method create

                                                                                                                        create: () => Promise<void>;

                                                                                                                          method fetchTemplates

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

                                                                                                                            method init

                                                                                                                            init: () => void;

                                                                                                                              method write

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

                                                                                                                                Namespaces

                                                                                                                                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 (6)

                                                                                                                                                        Dependencies (38)

                                                                                                                                                        Dev Dependencies (1)

                                                                                                                                                        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>