Git Product home page Git Product logo

taro-cli's Introduction

taro-js-cli

taro js版本的脚手架。含有完善的基础配置 taro + taro-ui + scss + react + mobx + axios + mock

注:taro-ui自定义主题功能需要使用scss, taro-ui是以750设计稿写的px(暂没有相关配置),因此设计稿要采用750px的 1px 边框使用 1PX 上拉刷新,下拉加载使用 taro 的 ScrollView 组件

启动taro服务命令

# 全局安装 taro 命令
npm install -g @tarojs/[email protected]

# 安装依赖
npm install

# 启动taro服务
npm run dev:h5

# 打包
npm run build:h5

启动 mock 在线服务

cd mock # 或者在 mockServer 目录下启动终端 

npm install

# 启动mock在线服务(port: 9000) 如果报错,则说明服务已经启动or端口被占用
npm start

# 关闭mock服务
npm run delete

目录结构

config # 配置文件
|-- dev.js # 开发环境
|-- prod.js # 正式环境
|-- index.js
mockServer # mock在线服务
|-- src
    |-- api # 接口文件
src
|-- api # 接口交互模块
|-- assets  # 图片,字体等资源
|-- components  # 公共组件
|-- config # 配置变量
|-- store   # mobx
|-- styles # 全局样式
|-- utils # 工具函数
|-- views   # 视图组件
|-- app.config.js # 配置文件,含router等
|-- app.js   # 入口js

taro-cli's People

Watchers

wenhao(浩烟) avatar

Forkers

enterpriseih

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.