Skip to content

lexmin0412/taro-create-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

taro-create-file

Introduction

taro-create-file,基于nodejs的fs模块实现命令行快速创建taro文件模板

Installation

yarn add taro-create-file -D

Config

package.json 中添加如下的script

{
  "scripts": {
    "template": "node node_modules/taro-create-file/template.js"
  }
}

Usage

  • 创建页面(同步创建scss和interface)
yarn template p directoryPath fileName fileDesc
  • 创建model
yarn template m directoryPath fileName fileDesc
  • 创建service
yarn template s directoryPath fileName fileDesc
  • 创建component
yarn template s directoryPath fileName fileDesc

demo

yarn template p flowpool noticeTplList 通知模版列表 noticeTplList

Command Params

参数 描述 默认值 参数说明
fileType 文件类型 无,必传 string p-page-页面 m-model-数据model s-service-服务类 c-component-组件
directoryPath 文件夹路径 无,必传 string
fileName 文件名 无,必传 string
fileDesc 文件描述 '文件描述' string

更新日志

点此前往

About

基于nodejs的命令行taro模版文件创建工具

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published