ynw-cli
CLI for VUE & REACT
3,139
| Install | |
|---|---|
npm install ynw-cli |
|
| Latest Version: | 2.3.10 |
| License: | ISC |
| Last Updated: | Nov 12, 2022 |
| Links: | GitHub · npm |
Maintainer: liqiang0335
ynw-cli
Install
npm i -g ynw-cli
Usage
# vue template
ynw init=vue
# react template
ynw init=react
# install and package
cnpm i
ynw build=app entry=app/index
Other
ynw v版本号ynw template=vue下载模板ynw cros: 打开跨域浏览器ynw sprite: 制作雪碧图ynw rename: 文件批量重命名ynw doc: 文档
配置选项
- 路径均为相对根目录
- style/var.scss = scss 全局变量 (无需引入)
- style/theme.json = antd 主题文件 (无需引入)
// ynw.config.js
module.exports = {
gulp: { src: "", dist: "" }, // 雪碧图
dll: { modules: { libs: ['vue','vuex',...] }, dist:"" }, // DLL
common: {
targets: { browsers: ["ie >= 11"] },
createDev: true, // 是否每次创建 dev.html
target: "web", // [web, electron-main, electron-renderer]
externals: {}, // 不打包的库如:{ vue:'Vue','react-dom':'ReactDOM' }
devServer: {
before,
proxy: {
"/my-dev": {
target: "http://www.xxx.com",
pathRewrite: { "^/my-dev": "" },
changeOrigin: true,
},
},
},
port: 9999, // 热更新模式端口
analyzer: false, // 打包报告
alias: {
"@store": "./app/store",
"@script": "./app/script",
"@comps": "./app/component",
"@const": "./app/constant",
"@hook": "./app/hook",
},
envPrefix: "",
extractCSS: false, // 是否提取CSS
splitModules: false, // 是否提取库文件
cssModules: false, // CSS模块化
dllPath: "", // 文件路径: 查找manifest文件
themePath: "", // 主题路径: 公用主题配置
dist: "", // 输出目录: 默认当前项目下 dist 文件夹
copy: [], // 复制文件: { from ,to }
},
/****具体的配置项(覆盖通用项)****/
pages: {
// demo为项目文件夹的名称
demo: {
extractCSS: true,
},
},
};
Version History
| Version | Released | License |
|---|---|---|
| 2.3.10 | ISC | |
| 2.3.9 | ISC | |
| 2.3.8 | ISC | |
| 2.3.7 | ISC | |
| 2.3.6 | ISC | |
| 2.3.5 | ISC | |
| 2.3.4 | ISC | |
| 2.3.3 | ISC | |
| 2.3.2 | ISC | |
| 2.3.1 | ISC | |
| 2.3.0 | ISC | |
| 2.2.7 | ISC | |
| 2.2.6 | ISC | |
| 2.2.5 | ISC | |
| 2.2.4 | ISC | |
| 2.2.3 | ISC | |
| 2.2.0 | ISC | |
| 2.1.32 | ISC | |
| 2.1.31 | ISC | |
| 2.1.30 | ISC | |
| 2.1.29 | ISC | |
| 2.1.28 | ISC | |
| 2.1.27 | ISC | |
| 2.1.26 | ISC | |
| 2.1.25 | ISC | |
| 2.1.23 | ISC | |
| 2.1.22 | ISC | |
| 2.1.21 | ISC | |
| 2.1.20 | ISC | |
| 2.1.19 | ISC |
Showing the latest 30 of 92. See every release on npm
Pre-releases (2)
| Version | Released | License |
|---|---|---|
| 2.0.1-beta | ISC | |
| 2.0.0-bata | ISC |