1.0.1 • Published 5 years ago

tuntuntutu-scabbard v1.0.1

Weekly downloads
2
License
MIT
Repository
-
Last release
5 years ago

tuntuntutu-scabbard


tuntuntutu的本地服务和打包配置

安装


如果项目通过tuntuntutu创建,则不需要单独安装。

yarn add tuntuntutu-scabbard -D
// or
npm install tuntuntutu-scabbard --save-dev

指令

serve

开启本地服务tuntuntutu-scabbard serve

build

打包编译 tuntuntutu-scabbard build

配置文件

tuntuntutu-scabbard的功能依赖于tuntuntutu.config.js

// tuntuntutu.config.js
module.exports = {
  // 项目名称,执行 tuntuntutu-scabbard build -R 时的 publicPath 的默认值
  name: 'my-app',

  // 终端类型(pc|mobile)
  platform: 'pc',

  // 项目类型(mpa|spa|lite)
  type: 'spa',
  
  // 自定义antd的主题
  // 参考地址: https://ant.design/docs/react/customize-theme-cn
  theme: {
      'primary-color': '#14161a',
  },

  // webpack-dev-server的proxy
  // 详细配置可参考https://webpack.js.org/configuration/dev-server/#devserver-proxy
  proxy: {
	'/api': 'http://localhost:3000'
  },
};