像vue-cli ,创建自己的脚手架

 痛点:

1,每次创建vue项目都要花半天的时间去配置
2,每个人不同的配置,导致项目维护麻烦
3,常用的组件切到新的项目很麻烦
4,项目频繁切换,标准不统一
 

解决:

怎么解决这些问题,制定项目模板,编写自定义组件,统一规范,
常用的移动端配置
和PC端配置这里都有
 
这时候fow-cli产生了github地址
 
相比于vue-cli, fow-cli 做了如下改动:
1. 默认添加三种创建项目模板 app, demo, 和 custom(自定义模板)
2. demo 模板-->pc 项目常用插件配置和组件(element-ui + 自定义封装组件)
3. app 模板-->移动端项目常用插件配置和组件(vant + 自定义封装组件)
4. custom 模板-->可选择不同端(不包含 自定义封装组件)

Getting Started

Install, create and start.

 

# Install
$ npm install fow-cli -g

# Create app
$ fow new myapp --demo

# Start app
$ cd myapp
$ npm install
$ npm start

 

Commands

We have 3 commands: newinit and create

 

fow new [options]

Create app with new directory.

 

Usage Examples

 

$ fow new myapp
$ fow new myapp --demo
$ fow new myapp --app

 

options

  • --demo -- 创建 PC 端项目
  • --app -- 创建 移动 端项目

 

fow init [options]

Create app in current directory. It's options is the same as fow new.

 

$ fow init --demo
$ fow init --app

 

options

  • --demo -- 创建 PC 端项目
  • --app -- 创建建移动端项目

fow create

自由选择配置项(不包含自定义组件),自动安装项目依赖,不需要 npm install

 

$ fow create

 

Usage Examples

 

fow create myapp

 

打包

 

# 普通打包
$ npm run build
github地址

 

posted @ 2020-05-18 17:18  有什么奇怪  阅读(467)  评论(0)    收藏  举报