Coder Social home page Coder Social logo

shm10 / taro-dva-ts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kavil/taro-dva-ts

1.0 1.0 0.0 97 KB

taro dva typescript 脚手架,开箱即用,有request interceptors拦截、iconfont图标自动下载、prettier+git提交前检查、页面模板命令生成等工具

License: MIT License

JavaScript 24.48% TypeScript 30.64% HTML 3.24% CSS 41.63%

taro-dva-ts's Introduction

脚手架

命令行快速生成模板页面 npm tpl 'page-name'

自动从iconfont更新 npm icon 'iconfont下载链接后缀'

技术栈

React + Taro + Dva + Sass + typeScript

使用eslint+prettier格式化

默认git提交前校验(如不需要可在package.json里删掉pre-commit配置)

项目运行


cd taro-dva-ts

# 安装项目依赖
yarn

# 微信小程序
npm run dev:weapp

# 支付宝小程序
npm run dev:alipay

# 百度小程序
npm run dev:swan

# 字节跳动小程序
npm run dev:tt

# QQ小程序
npm run dev:qq

# H5
npm run dev:h5

# React Native
npm run dev:rn

# pages模版快速生成
npm run tpl `文件名`

业务介绍

目录结构

├── .temp                  // H5编译结果目录
├── .rn_temp               // RN编译结果目录
├── dist                   // 小程序编译结果目录
├── config                 // Taro配置目录
│   ├── dev.js                 // 开发时配置
│   ├── index.js               // 默认配置
│   └── prod.js                // 打包时配置
├── site                   // H5静态文件(打包文件)
├── src                    // 源码目录
│   ├── components             // 组件
│   ├── config                 // 项目开发配置
│   ├── models                 // redux models
│   ├── pages                  // 页面文件目录
│   │   └── account
│   │       ├── index.js           // 页面逻辑
│   │       ├── index.scss         // 页面样式
│   ├── service            // 页面api等服务
│   ├── static             // 字体、图片
│   ├── utils              // 常用工具类
│   ├── app.js             // 入口文件
│   └── index.html
├── package.json
├── template.js            // pages模版快速生成脚本,执行命令 npm run tpl `文件名`
└── get-iconfont.js        // iconfont快速更新,执行命令 npm run iconfont

文档

Taro开发文档

https://nervjs.github.io/taro/docs/README.html

dva开发文档地址

https://dvajs.com/

小程序开发文档

https://mp.weixin.qq.com/debug/wxadoc/dev/

License

MIT

taro-dva-ts's People

Contributors

kavil avatar

Stargazers

chenyz avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.