ytian-scabbard
service for ytian
Last updated 5 months ago by sliwey .
MIT · Original npm · Tarball · package.json
$ cnpm install ytian-scabbard 
SYNC missed versions from official npm registry.

ytian-scabbard


ytian的本地服务和打包配置

安装


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

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

指令

serve

开启本地服务ytian-scabbard serve

参数 默认值 说明 示例
--https false 使用https ytian-scabbard serve --https
--host 本机ip 修改host ytian-scabbard serve --host 127.0.0.1
--port 8088 修改端口 ytian-scabbard serve --port 8888
--open false 自动打开浏览器 ytian-scabbard serve --open
**build**

打包编译 ytian-scabbard build

参数 默认值 说明 示例
-R, --no-root false 是否设置publicPath ytian-scabbard build -R
-n, --project-name ytian.config.js中的name publicPath的值 ytian-scabbard build -n my-app
*简单来说`publicPath`就是域名之后紧跟着的那级目录:`http://center.caocaokeji.cn/publicPath/xxx/xxx`*

更多publicPath相关内容可以看这里

配置文件

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

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

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

  // 项目类型(cc-center|spa|spa-pro)
  type: 'cc-center',

  // postcss-viewport的参数,只在target为mobile时生效,默认375
  viewportWidth: 640,

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

Current Tags

  • 3.3.5                                ...           latest (5 months ago)

80 Versions

  • 3.3.5                                ...           5 months ago
  • 3.3.3                                ...           6 months ago
  • 3.3.2                                ...           8 months ago
  • 3.3.1                                ...           8 months ago
  • 3.3.0                                ...           8 months ago
  • 3.2.7                                ...           8 months ago
  • 3.2.6                                ...           8 months ago
  • 3.2.5                                ...           8 months ago
  • 3.2.4                                ...           8 months ago
  • 3.2.3                                ...           8 months ago
  • 3.2.2                                ...           9 months ago
  • 3.2.1                                ...           9 months ago
  • 3.1.11                                ...           9 months ago
  • 3.1.11-beta.3                                ...           9 months ago
  • 3.1.11-beta.2                                ...           9 months ago
  • 3.1.11-beta.1                                ...           9 months ago
  • 3.1.11-alpha.6                                ...           9 months ago
  • 3.1.11-alpha.5                                ...           9 months ago
  • 3.1.11-alpha.3                                ...           9 months ago
  • 3.1.11-alpha.2                                ...           10 months ago
  • 3.1.11-alpha.1                                ...           10 months ago
  • 3.1.9                                ...           a year ago
  • 3.1.8                                ...           a year ago
  • 3.1.7                                ...           a year ago
  • 3.1.6                                ...           a year ago
  • 3.1.5                                ...           a year ago
  • 3.1.4                                ...           a year ago
  • 3.1.3                                ...           a year ago
  • 3.1.2                                ...           a year ago
  • 3.1.1                                ...           a year ago
  • 3.1.0                                ...           a year ago
  • 3.0.14                                ...           a year ago
  • 3.0.11                                ...           a year ago
  • 3.0.10                                ...           a year ago
  • 3.0.9                                ...           a year ago
  • 3.0.8                                ...           a year ago
  • 3.0.7                                ...           a year ago
  • 3.0.6                                ...           a year ago
  • 3.0.5                                ...           a year ago
  • 3.0.4                                ...           a year ago
  • 2.1.9                                ...           a year ago
  • 3.0.1                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 2.1.8                                ...           a year ago
  • 2.1.7                                ...           a year ago
  • 3.0.0-0                                ...           a year ago
  • 2.1.6                                ...           a year ago
  • 2.1.5                                ...           a year ago
  • 2.1.4                                ...           a year ago
  • 2.1.3                                ...           a year ago
  • 2.1.2                                ...           a year ago
  • 2.1.1                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.8                                ...           a year ago
  • 2.0.7                                ...           a year ago
  • 2.0.4                                ...           a year ago
  • 2.0.3                                ...           a year ago
  • 2.0.2                                ...           a year ago
  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 2.0.0-beta.2                                ...           a year ago
  • 2.0.0-beta.1                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
  • 0.1.19                                ...           a year ago
  • 0.1.18                                ...           a year ago
  • 0.1.17                                ...           a year ago
  • 0.1.16                                ...           a year ago
  • 0.1.15                                ...           a year ago
  • 0.1.14                                ...           a year ago
  • 0.1.13                                ...           a year ago
  • 0.1.12                                ...           a year ago
  • 0.1.11                                ...           a year ago
  • 0.1.10                                ...           a year ago
  • 0.1.9                                ...           a year ago
  • 0.1.8                                ...           a year ago
  • 0.1.7                                ...           a year ago
  • 0.1.6                                ...           a year ago
  • 0.1.2                                ...           a year ago
  • 0.1.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 9
Last Day 0
Last Week 3
Last Month 92
Dependencies (37)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |